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 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, setClassPool
public AppletServer(String port) throws IOException, NotFoundException, CannotCompileException
port
- port numberIOException
NotFoundException
CannotCompileException
public AppletServer(int port) throws IOException, NotFoundException, CannotCompileException
port
- port numberIOException
NotFoundException
CannotCompileException
public AppletServer(int port, ClassPool src) throws IOException, NotFoundException, CannotCompileException
port
- port numbersrc
- the source of classs files.IOException
NotFoundException
CannotCompileException
public int exportObject(String name, Object obj) throws CannotCompileException
name
- the name used for looking the object up.obj
- the exported object.CannotCompileException
ObjectImporter.lookupObject(String)
public void doReply(InputStream in, OutputStream out, String cmd) throws IOException, BadHttpRequest
doReply
in class Webserver
out
- the output stream to a clientcmd
- the command received from a clientIOException
BadHttpRequest
Copyright © 2024. All rights reserved.