public abstract class SocketSessionHandler extends SessionHandlerBase implements java.lang.Runnable
Implementation of a session handler that uses a Java socket to listen for incoming session requests.
ListenBacklog| Constructor and Description |
|---|
SocketSessionHandler(java.lang.String name,
java.lang.String protocol,
NetworkServer server,
java.net.InetAddress addr,
int port)
Class constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
acceptConnection(java.net.Socket sock)
Accept a new connection on the specified socket
|
void |
closeSessionHandler(NetworkServer server)
Close the session handler
|
java.net.ServerSocket |
getSocket()
Return the server socket
|
int |
getSocketTimeout()
Return the client socket timeout, in milliseconds
|
void |
initializeSessionHandler(NetworkServer server)
Initialize the session handler
|
void |
run()
Socket listener thread
|
void |
setSocketTimeout(int tmo)
Set the client socket timeout, in milliseconds, zero for no timeout
|
clearShutdown, getBindAddress, getHandlerName, getListenBacklog, getNextSessionId, getPort, getProtocolName, getServer, hasBindAddress, hasDebug, hasShutdown, setDebug, setPort, setShutdown, toStringpublic SocketSessionHandler(java.lang.String name,
java.lang.String protocol,
NetworkServer server,
java.net.InetAddress addr,
int port)
name - Stringprotocol - Stringserver - NetworkServeraddr - InetAddressport - intpublic final java.net.ServerSocket getSocket()
public final int getSocketTimeout()
public final void setSocketTimeout(int tmo)
tmo - intpublic void initializeSessionHandler(NetworkServer server) throws java.io.IOException
initializeSessionHandler in interface SessionHandlerInterfaceinitializeSessionHandler in class SessionHandlerBaseserver - NetworkServerjava.io.IOExceptionpublic void closeSessionHandler(NetworkServer server)
closeSessionHandler in interface SessionHandlerInterfacecloseSessionHandler in class SessionHandlerBaseserver - NetworkServerpublic void run()
run in interface java.lang.Runnableprotected abstract void acceptConnection(java.net.Socket sock)
sock - SocketCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.