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.ObjectImporter
debugDir, htmlfileBase, translator
Constructor | 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 | 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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addTranslator, end, logging, logging, logging, logging2, main, setClassPool
public AppletServer(java.lang.String port) throws java.io.IOException, NotFoundException, CannotCompileException
port
- port numberjava.io.IOException
NotFoundException
CannotCompileException
public AppletServer(int port) throws java.io.IOException, NotFoundException, CannotCompileException
port
- port numberjava.io.IOException
NotFoundException
CannotCompileException
public AppletServer(int port, ClassPool src) throws java.io.IOException, NotFoundException, CannotCompileException
port
- port numbersrc
- the source of classs files.java.io.IOException
NotFoundException
CannotCompileException
public 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.CannotCompileException
ObjectImporter.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 Webserver
out
- the output stream to a clientcmd
- the command received from a clientjava.io.IOException
BadHttpRequest
Copyright © 2018 Shigeru Chiba, www.javassist.org. All Rights Reserved.