public class HSMSSocketListener extends java.lang.Object implements java.lang.Runnable, SimulationListener
HSMSSocketManager
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
cvsRev |
static boolean |
globalSimulation
This variable will be true if we are simulating.
|
Modifier and Type | Method and Description |
---|---|
void |
addMessageHandler(int deviceId,
java.lang.Object messageHandlerObject)
Add a message handler for this connection.
|
void |
closeListeningSocket()
Close the listening socket manager.
|
void |
closeListeningSocket(boolean removeListener)
Close the listening socket manager.
|
java.util.Vector |
getAllSessions()
This will return back a Vector of SessionManagers associated with this
connection.
|
int |
getConnectionLimit()
Remove a connection manager from this socket manager.
|
static HSMSSocketListener |
getHSMSSocketListener(int port)
Returns a Socket Listener for the port provided.
|
LoggerInterface |
getLogger()
Returns the logger for this connection.
|
java.util.Hashtable |
getMessageHandlers()
Returns the Vector of message handlers.
|
int |
getPort()
Returns the port that we are listening on.
|
SessionManager |
getSessionManager(int deviceId)
This will return a session manager for the give id, if we spawned it.
|
boolean |
isSimulating() |
boolean |
isSimulationFlag() |
void |
removeMessageHandler(int deviceId,
java.lang.Object messageHandlerObject)
Remove a message handler from this connection.
|
void |
run()
runs the server and waits for input on the selected port.
|
void |
setConnectionLimit(int newLimit)
Sets the maximum number of allowable connections.
|
void |
setLogger(LoggerInterface logger)
Set the logger for this connection.
|
void |
setSimulationFlag(boolean simulationFlag)
Sets the state of the simulation flag.
|
void |
simulationStateChanged(SimulationChangedEvent simulationChangedEvent)
Changes the state of the simulation mode.
|
java.lang.String |
toString() |
public static final java.lang.String cvsRev
public static boolean globalSimulation
public void addMessageHandler(int deviceId, java.lang.Object messageHandlerObject)
public void closeListeningSocket() throws java.io.IOException
java.io.IOException
public void closeListeningSocket(boolean removeListener) throws java.io.IOException
removeListener
- true if this port should be removed from the socket listeners
this is the case on a true close, but the port is not removed when moving into
a simulation state.java.io.IOException
public java.util.Vector getAllSessions()
public int getConnectionLimit()
HSMSConnectionManager
public static HSMSSocketListener getHSMSSocketListener(int port) throws java.io.IOException
java.io.IOException
public LoggerInterface getLogger()
public java.util.Hashtable getMessageHandlers()
public int getPort()
public SessionManager getSessionManager(int deviceId)
public boolean isSimulating()
public boolean isSimulationFlag()
public void removeMessageHandler(int deviceId, java.lang.Object messageHandlerObject)
public void run()
run
in interface java.lang.Runnable
public void setConnectionLimit(int newLimit)
public void setLogger(LoggerInterface logger)
public void setSimulationFlag(boolean simulationFlag)
setSimulationFlag
in interface SimulationListener
simulationFlag
- will be written as "false" when code is generated.public void simulationStateChanged(SimulationChangedEvent simulationChangedEvent) throws java.lang.Exception
simulationStateChanged
in interface SimulationListener
java.lang.Exception
- TODOpublic java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
Copyright © 1999-2025 ErgoTech Systems, Inc. All Rights Reserved.