com.ls.lars.communication
Class JSocketListener

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

public class JSocketListener
extends SocketListener

manages incoming client requests via j-sockets

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

Field Summary
static int jSocketListenerThreadId
          thread id for j secure socket listeners
 
Fields inherited from class com.ls.lars.communication.SocketListener
connectionParameters, listenerThread, logger, port, socketListenerThreadId
 
Constructor Summary
JSocketListener(int port)
          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 JSocketMessenger)
 int nextSocketListenerId()
          Returns the next unique (within this Java Virtual Machine) id to be used in a jsocket 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

jSocketListenerThreadId

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

JSocketListener

public JSocketListener(int port)
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
Method Detail

createClientSocketMessenger

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

nextSocketListenerId

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