Overview | Package | Class | Use | Tree | Deprecated | Index
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javassist.rmi
Class AppletServer

    java.lang.Object
      |
      +--javassist.web.Webserver
            |
            +--javassist.rmi.AppletServer

public class AppletServer
extends Webserver

An AppletServer object is a web server that an ObjectImporter communicates with. It makes the objects specified by `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.

See Also:
  `ObjectImporter`

Field Summary

Fields inherited from class javassist.web.Webserver
`debugDir, htmlfileBase`

Constructor Summary
`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.

Method Summary
`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.

Methods inherited from class javassist.web.Webserver
`end, logging, logging, logging, logging2, main, setClassPool`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AppletServer

    public AppletServer(java.lang.String port)
                 throws java.io.IOException,
                        NotFoundException,
                        CannotCompileException

  Constructs a web server.

Parameters:
  `port` - port number

### AppletServer

    public AppletServer(int port)
                 throws java.io.IOException,
                        NotFoundException,
                        CannotCompileException

  Constructs a web server.

Parameters:
  `port` - port number

### AppletServer

    public AppletServer(int port,
                        ClassPool src)
                 throws java.io.IOException,
                        NotFoundException,
                        CannotCompileException

  Constructs a web server.

Parameters:
  `port` - port number
  `src` - the source of classs files.

Method Detail

### run

    public void run()

  Begins the HTTP service.

  Overrides:
    `run` in class `Webserver`

### exportObject

    public int exportObject(java.lang.String name,
                            java.lang.Object obj)
                     throws CannotCompileException

  Exports an object. This method produces the bytecode of the proxy class used to access the exported object. A remote applet can load the proxy class and call a method on the exported object.

  Parameters:
    `name` - the name used for looking the object up.
  Returns:
    the object identifier
    `CannotCompileException`
  See Also:
    `ObjectImporter.lookupObject(String)`

### doReply

    public void doReply(java.io.InputStream in,
                        java.io.OutputStream out,
                        java.lang.String cmd)
                 throws java.io.IOException,
                        BadHttpRequest

  Processes a request from a web browser (an ObjectImporter).

  Overrides:
    `doReply` in class `Webserver`
  Parameters:
    `out` - the output stream to a client
    `cmd` - the command received from a client
    `java.io.IOException`
    `BadHttpRequest`

Overview | Package | Class | Use | Tree | Deprecated | Index
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Javassist, a Java-bytecode translator toolkit. Copyright (C) 1999-2003 Shigeru Chiba. All Rights Reserved.