com.ls.lars.communication
Class JSecureSocketListener

java.lang.Object
  |
  +--com.ls.lars.communication.SocketListener
        |
        +--com.ls.lars.communication.JSecureSocketListener
All Implemented Interfaces:
Runnable, Serializable

public class JSecureSocketListener
extends SocketListener

manages incoming client requests via j-secure sockets

Version:
$Revision: 1.6 $
Author:
Last modified by $Author: ODrugan $
See Also:
Serialized Form

Field Summary
static int jSecureSocketListenerThreadId
          thread id for j secure socket listeners
 
Fields inherited from class com.ls.lars.communication.SocketListener
connectionParameters, listenerThread, logger, port, socketListenerThreadId
 
Constructor Summary
JSecureSocketListener(int port, String loginAgentName)
          Constructor, that sets the agent and port and gets a reference to the message router.
 
Method Summary
protected  com.ls.lars.communication.SocketMessenger createClientSocketMessenger(Socket clientSocket)
          creates a client socket messenger (here: a JSecureSocketMessenger)
 int nextSocketListenerId()
          Returns the next unique (within this Java Virtual Machine) id to be used in a socket listener name.
 
Methods inherited from class com.ls.lars.communication.SocketListener
run, setConnectionParameters, setLog, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jSecureSocketListenerThreadId

public static int jSecureSocketListenerThreadId
thread id for j secure socket listeners
Constructor Detail

JSecureSocketListener

public JSecureSocketListener(int port,
                             String loginAgentName)
Constructor, that sets the agent and port and gets a reference to the message router.
Parameters:
listenerAgent - agent which belongs to this listener
port - port number on which the listener should listen
loginAgentName - name of the agent which handles the login process
Method Detail

createClientSocketMessenger

protected com.ls.lars.communication.SocketMessenger createClientSocketMessenger(Socket clientSocket)
creates a client socket messenger (here: a JSecureSocketMessenger)
Overrides:
createClientSocketMessenger in class SocketListener
Parameters:
clientSocket - socket by that the client is connected to the server
Returns:
the created JSecureSocketMessenger

nextSocketListenerId

public int nextSocketListenerId()
Returns the next unique (within this Java Virtual Machine) id to be used in a socket listener name.
Overrides:
nextSocketListenerId in class SocketListener
Returns:
jSecureSocketListenerThreadId the next possible thread id