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, translator| Constructor and Description |
|---|
AppletServer(int port)
Constructs a web server.
|
AppletServer(int port,
ClassPool src)
Constructs a web server.
|
AppletServer(String port)
Constructs a web server.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doReply(InputStream in,
OutputStream out,
String cmd)
Processes a request from a web browser (an ObjectImporter).
|
int |
exportObject(String name,
Object obj)
Exports an object.
|
void |
run()
Begins the HTTP service.
|
addTranslator, end, logging, logging, logging, logging2, main, setClassPoolpublic AppletServer(String port) throws IOException, NotFoundException, CannotCompileException
port - port numberIOExceptionNotFoundExceptionCannotCompileExceptionpublic AppletServer(int port)
throws IOException,
NotFoundException,
CannotCompileException
port - port numberIOExceptionNotFoundExceptionCannotCompileExceptionpublic AppletServer(int port,
ClassPool src)
throws IOException,
NotFoundException,
CannotCompileException
port - port numbersrc - the source of classs files.IOExceptionNotFoundExceptionCannotCompileExceptionpublic int exportObject(String name, Object obj) throws CannotCompileException
name - the name used for looking the object up.obj - the exported object.CannotCompileExceptionObjectImporter.lookupObject(String)public void doReply(InputStream in, OutputStream out, String cmd) throws IOException, BadHttpRequest
doReply in class Webserverout - the output stream to a clientcmd - the command received from a clientIOExceptionBadHttpRequestCopyright © 2016 Shigeru Chiba, www.javassist.org. All Rights Reserved.