public class AppletServer extends Webserver
exportObject() remotely accessible from applets.
If the classes of the exported objects are requested by the client-side
JVM, this web server sends proxy classes for the requested classes.ObjectImporterdebugDir, htmlfileBase| Constructor and Description |
|---|
AppletServer(int port)
Constructs a web server.
|
AppletServer(int port,
ClassPool src)
Constructs a web server.
|
AppletServer(java.lang.String port)
Constructs a web server.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doReply(java.io.InputStream in,
java.io.OutputStream out,
java.lang.String cmd)
Processes a request from a web browser (an ObjectImporter).
|
int |
exportObject(java.lang.String name,
java.lang.Object obj)
Exports an object.
|
void |
run()
Begins the HTTP service.
|
addTranslator, end, logging, logging, logging, logging2, main, setClassPoolpublic AppletServer(java.lang.String port)
throws java.io.IOException,
NotFoundException,
CannotCompileException
port - port numberjava.io.IOExceptionNotFoundExceptionCannotCompileExceptionpublic AppletServer(int port)
throws java.io.IOException,
NotFoundException,
CannotCompileException
port - port numberjava.io.IOExceptionNotFoundExceptionCannotCompileExceptionpublic AppletServer(int port,
ClassPool src)
throws java.io.IOException,
NotFoundException,
CannotCompileException
port - port numbersrc - the source of classs files.java.io.IOExceptionNotFoundExceptionCannotCompileExceptionpublic int exportObject(java.lang.String name,
java.lang.Object obj)
throws CannotCompileException
name - the name used for looking the object up.obj - the exported object.CannotCompileExceptionObjectImporter.lookupObject(String)public void doReply(java.io.InputStream in,
java.io.OutputStream out,
java.lang.String cmd)
throws java.io.IOException,
BadHttpRequest
doReply in class Webserverout - the output stream to a clientcmd - the command received from a clientjava.io.IOExceptionBadHttpRequestJavassist, a Java-bytecode translator toolkit.
Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.