|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectecologylab.generic.Debug
ecologylab.services.distributed.legacy.ServicesServerBase
public abstract class ServicesServerBase
A base set of fields and methods that are necessary for any server implementation.
| Field Summary | |
|---|---|
protected int |
connectionCount
|
protected boolean |
finished
|
protected Scope |
objectRegistry
Provides a context for request processing. |
protected int |
portNumber
|
protected TranslationSpace |
requestTranslationSpace
Space that defines mappings between xml names, and Java class names, for request messages. |
protected java.util.LinkedList<ServerListener> |
serverListeners
|
protected java.net.ServerSocket |
serverSocket
|
protected boolean |
shuttingDown
|
| Constructor Summary | |
|---|---|
protected |
ServicesServerBase(int portNumber,
TranslationSpace requestTranslationSpace,
Scope objectRegistry)
Creates a Services Server Base. |
| Method Summary | |
|---|---|
void |
addServerListener(ServerListener listener)
|
protected void |
connectionTerminated()
Remove the argument passed in from the set of connections we know about. |
protected void |
fireServerEvent(java.lang.String event)
|
protected java.lang.String |
generateSessionToken(java.net.Socket incomingSocket)
Generates a unique identifier String for the given socket, based upon actual ports used and ip addresses with a hash. |
java.net.SocketAddress |
getAddress()
|
Scope |
getObjectRegistry()
Get the message passing context associated with this server. |
int |
getPortNumber()
|
TranslationSpace |
getRequestTranslationSpace()
|
ResponseMessage |
performService(RequestMessage requestMessage)
Perform the service associated with a RequestMessage, by calling the performService() method on that message. |
protected void |
terminationAction()
This defines the actions that server needs to perform when the client ends unexpected way. |
RequestMessage |
translateXMLStringToRequestMessage(java.lang.String messageString,
boolean doRecursiveDescent)
|
| Methods inherited from class ecologylab.generic.Debug |
|---|
classSimpleName, closeLoggingFile, debug, debug, debug, debug, debugA, debugA, debugA, debugI, debugI, debugI, error, error, getClassName, getClassName, getInteractive, getPackageName, getPackageName, getPackageName, initialize, level, level, level, logToFile, print, print, println, println, println, println, println, println, printlnA, printlnA, printlnA, printlnI, printlnI, printlnI, printlnI, setLoggingFile, show, show, superString, toggleInteractive, toString, toString, warning, warning, weird, weird |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ecologylab.generic.StartAndStoppable |
|---|
start, stop |
| Methods inherited from interface ecologylab.services.distributed.impl.Shutdownable |
|---|
shutdown |
| Field Detail |
|---|
protected int portNumber
protected java.net.ServerSocket serverSocket
protected boolean finished
protected boolean shuttingDown
protected java.util.LinkedList<ServerListener> serverListeners
protected TranslationSpace requestTranslationSpace
protected Scope objectRegistry
protected int connectionCount
| Constructor Detail |
|---|
protected ServicesServerBase(int portNumber,
TranslationSpace requestTranslationSpace,
Scope objectRegistry)
throws java.io.IOException,
java.net.BindException
portNumber - translationSpace - objectRegistry - Provides a context for request processing.
java.io.IOException
java.net.BindException| Method Detail |
|---|
protected java.lang.String generateSessionToken(java.net.Socket incomingSocket)
incomingSocket -
public ResponseMessage performService(RequestMessage requestMessage)
requestMessage - Message to perform.
public RequestMessage translateXMLStringToRequestMessage(java.lang.String messageString,
boolean doRecursiveDescent)
throws XMLTranslationException
XMLTranslationExceptionprotected void connectionTerminated()
protected void terminationAction()
public Scope getObjectRegistry()
public TranslationSpace getRequestTranslationSpace()
public java.net.SocketAddress getAddress()
public void addServerListener(ServerListener listener)
protected void fireServerEvent(java.lang.String event)
public int getPortNumber()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||