public abstract class ConnectionManager
extends java.lang.Object
Constructor and Description |
---|
ConnectionManager()
Handles Simulation Modes.
|
Modifier and Type | Method and Description |
---|---|
void |
addSessionManager(SessionManager sm)
Add a session manager.
|
void |
addSessionManager(SessionManager sm,
int deviceId)
Add a session manager.
|
void |
closeConnection()
Terminate the connection.
|
boolean |
getActiveEntityFlag()
Returns true if we are the active entity or host, otherwise false.
|
abstract java.lang.String |
getId()
Returns an ID for this connection.
|
abstract SessionManager |
getNewSessionManager()
Return a new session manager object.
|
PortManager |
getPortManager()
returns the port manager
|
SessionManager |
getSessionManager(int sessionId)
This will return the SessionManager object for a specific sessionId
or it will return the general session SessionManager if on exists.
|
java.util.Hashtable<java.lang.Integer,SessionManager> |
getSessionManagers()
This will return the all the session managers.
|
abstract boolean |
requiresPoll()
Returns true if we need to poll for messages.
|
void |
sendMessage(byte[] msg)
Send data out through the connection.
|
void |
sendMessage(byte[][] msg)
Send multi-block data out through the connection.
|
void |
setActiveEntityFlag(boolean flag)
Controls whether we are the active entity.
|
void |
setPortManager(PortManager newValue)
sets the port manager
|
public void addSessionManager(SessionManager sm)
sm
- public void addSessionManager(SessionManager sm, int deviceId)
sm
- public void closeConnection() throws SecsException
SecsException
public boolean getActiveEntityFlag()
public abstract java.lang.String getId()
public abstract SessionManager getNewSessionManager()
SessionManager.getNewSessionManager()
public PortManager getPortManager()
public SessionManager getSessionManager(int sessionId)
public java.util.Hashtable<java.lang.Integer,SessionManager> getSessionManagers()
public abstract boolean requiresPoll()
public void sendMessage(byte[] msg) throws java.io.IOException, SecsException
java.io.IOException
SecsException
public void sendMessage(byte[][] msg) throws java.io.IOException, SecsException
java.io.IOException
SecsException
public void setActiveEntityFlag(boolean flag)
flag
- true if we are the active entity or host.public void setPortManager(PortManager newValue)
Copyright © 1999-2025 ErgoTech Systems, Inc. All Rights Reserved.