|
jSyncManager Simple Java Server | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread org.jSyncManager.SJS.API.AbstractAdapter org.jSyncManager.SJS.API.AbstractRequestResponseAdapter
public abstract class AbstractRequestResponseAdapter
An abstract parent for all Request/Response adapters. This adapter class expands upon the AbstractAdapter to provide request/response style communications. Sub-classes need implement only one method to handle their communications.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class org.jSyncManager.SJS.API.AbstractAdapter |
---|
props |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
AbstractRequestResponseAdapter()
Constructs a new AbstractRequestResponseAdapter instance. |
Method Summary | |
---|---|
protected void |
disconnect()
The disconnect method. |
protected java.lang.String |
getConnectionHeaderString()
The Connection Header method. |
protected java.lang.String |
getTimeoutMessage()
The timeout error message. |
protected void |
processConnection(java.io.InputStream in,
java.io.OutputStream out)
The processConnection method. |
protected abstract java.lang.String |
processRequest(java.lang.String request)
The processRequest method. |
Methods inherited from class org.jSyncManager.SJS.API.AbstractAdapter |
---|
connectionPermitted, getConnectionManagerInterface, getInetAddress, getLogManager, getProperty, processConnection, run, setLogManager, setThreadGroup |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractRequestResponseAdapter()
Method Detail |
---|
protected final void processConnection(java.io.InputStream in, java.io.OutputStream out) throws java.lang.Exception
processConnection
in class AbstractAdapter
in
- the InputStream object for communications.out
- the OutputStream object for communications.
java.lang.Exception
- any checked exception not caught and handled by the
adapter.protected final void disconnect()
disconnect
in class AbstractAdapter
protected abstract java.lang.String processRequest(java.lang.String request) throws java.lang.Exception
request
- the request to be processed.
java.lang.Exception
- any checked exception that goes unhandled.protected java.lang.String getConnectionHeaderString()
protected java.lang.String getTimeoutMessage()
|
jSyncManager Simple Java Server | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |