com.javageeks.gjas.services
Class ConnectionManager

java.lang.Object
  |
  +--com.javageeks.gjas.services.ThreadedServer
        |
        +--com.javageeks.gjas.services.SocketServer
              |
              +--com.javageeks.gjas.services.ConnectionManager
All Implemented Interfaces:
java.io.Serializable, Service

public class ConnectionManager
extends SocketServer

ConnectionManager is a ThreadedServer that specifically manages a single type of socket connection between this host and some anonymous client.

TODO:

See Also:
Serialized Form

Fields inherited from class com.javageeks.gjas.services.SocketServer
m_serverSocket, PORT_PROP, TIMEOUT_PROP
 
Fields inherited from class com.javageeks.gjas.services.ThreadedServer
m_paused, m_shouldStop
 
Fields inherited from interface com.javageeks.gjas.Service
PAUSED, PAUSING, RESUMING, RUNNING, STARTING, STOPPED, STOPPING
 
Constructor Summary
ConnectionManager()
           
 
Method Summary
 ConfigProperties getConfigInfo()
          Return the Properties configuration information
 void serve(java.net.Socket socket)
          Derived services must override this method.
 void setConfigInfo(ConfigProperties props)
          Set the Properties configuration information
 void start()
          Start the Service.
 
Methods inherited from class com.javageeks.gjas.services.SocketServer
getPort, setPort, stop
 
Methods inherited from class com.javageeks.gjas.services.ThreadedServer
getInstanceID, getState, getThread, isPaused, kill, pause, resume, setRunnable, setState, setThread, shouldStop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionManager

public ConnectionManager()
Method Detail

start

public void start()
           throws java.lang.Exception
Start the Service.
Overrides:
start in class SocketServer

getConfigInfo

public ConfigProperties getConfigInfo()
Description copied from interface: Service
Return the Properties configuration information
Overrides:
getConfigInfo in class SocketServer

setConfigInfo

public void setConfigInfo(ConfigProperties props)
Description copied from interface: Service
Set the Properties configuration information
Overrides:
setConfigInfo in class SocketServer

serve

public void serve(java.net.Socket socket)
           throws java.lang.Exception
Description copied from class: SocketServer
Derived services must override this method. Once a client has connected to us, this method is called to "do the work" of handling the connection.
Overrides:
serve in class SocketServer