|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
gov.virginia.dcjs.jini.service.GenericService
gov.virginia.dcjs.server.TCPServer
gov.virginia.dcjs.server.ClearServer
This is the superclass of distributed TCP / IP servers.
* This class listens for and presides over communications with
* clients. Each client thread remains active until either the
* prespecified timeout expires, or the client sends an
* gov.virginia.dcjs.client.util.CommunicationRequestType.BYE object.
*
* Please Note: Subclasses must register at least one
* gov.virginia.dcjs.server.util.RequestHandler object to do anything
* meaningful.
| Field Summary |
| Fields inherited from class gov.virginia.dcjs.jini.service.GenericService |
r_name |
| Fields inherited from class java.rmi.server.RemoteObject |
ref |
| Constructor Summary | |
ClearServer(java.lang.String config)
|
|
| Method Summary | |
void |
addHandler(RequestHandler handler)
Register the provided handler for request processing. |
protected void |
closeStreams()
Ends communication with client. |
protected Request |
receiveRequest()
Wait until the next request is received from the client via a clear stream. |
void |
removeHandler(RequestHandler handler)
Unregister the provided handler for request processing. |
protected void |
requestsFinished()
Client requests are completed. |
protected boolean |
sendResponse(Response response)
Send the specified response to the client via a clear stream. |
protected void |
serveClient()
This method is called by the superclass for each client connection. |
| Methods inherited from class gov.virginia.dcjs.server.TCPServer |
finalize, getConfiguration, getPort, getSocket, logWrite, run, start, stop |
| Methods inherited from class gov.virginia.dcjs.jini.service.GenericService |
destroy, getAdmin, initializeServiceName, serviceIDNotify |
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
| Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.jini.admin.Administrable |
getAdmin |
| Constructor Detail |
public ClearServer(java.lang.String config)
throws java.rmi.RemoteException
config - URL of server configuration file conforming to the
* ClearStream.dtd at that site.| Method Detail |
protected final boolean sendResponse(Response response)
protected final Request receiveRequest()
throws java.nio.channels.ClosedChannelException
java.nio.channels.ClosedChannelExceptionprotected void serveClient()
serveClient in class TCPServerpublic final void addHandler(RequestHandler handler)
public final void removeHandler(RequestHandler handler)
protected void requestsFinished()
protected void closeStreams()
* IpApplicationServer, can clean up their own streams
* prior to calling super.closeStreams().
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||