public abstract class HSMSWrapper extends java.lang.Object implements java.io.Serializable, SecsEventListener, WrapperInterface
cvsRev
Constructor and Description |
---|
HSMSWrapper(int port,
int deviceId)
Create the passive wrapper for the particular TCP/IP port.
|
Modifier and Type | Method and Description |
---|---|
void |
addMessageHandler(java.lang.Object messageHandler)
Add a message handler object.
|
void |
addMessageHandler(java.io.Serializable messageHandler)
Add a message handler object.
|
abstract boolean |
connect()
Connected the session.
|
void |
destroy() |
void |
disconnect()
Disconnect the connection.
|
static double |
getDefaultLinkTestInterval()
Sets the default link test interval.
|
int |
getDeviceId()
Returns the current device id.
|
double |
getLinkTestInterval()
This value controls how often LinkTest messages are sent.
|
LoggerInterface |
getLogger()
Returns the current logger.
|
java.util.List<java.lang.Object> |
getMessageHandlers()
Return the list of message handlers.
|
int |
getPort()
Returns the current TCP/IP port.
|
PortManager |
getPortManager()
Returns the port manager for the wrapper.
|
SessionManager |
getRawSessionManager(int deviceId)
Get a session manager for the provided deviceID.
|
SessionManager |
getSessionManager()
This will return the SessionManager if one exists.
|
SessionManager |
getSessionManager(int deviceId)
Get a session manager for the provided deviceID.
|
double |
getT3()
Returns the reply timeout.
|
int |
getT5() |
int |
getT6() |
int |
getT7() |
int |
getT8() |
void |
init() |
void |
removeMessageHandler(java.lang.Object messageHandler)
Remove a message handler object.
|
void |
secsEvent(SecsEvent theEvent)
Catches incoming PORT_ERROR and SESSION_CREATED events and removes the portManager.
|
void |
setActive(boolean flag)
Determines whether newly created sessions should be set to the active session.
|
void |
setDefault(boolean flag)
Determines whether newly created sessions should be set to the default session.
|
static void |
setDefaultLinkTestInterval(double defaultLinkTestInterval)
Sets the default link test interval.
|
void |
setDeviceId(int newValue)
Sets the device id for this wrapper.
|
void |
setLinkTestInterval(double linkTestInterval)
This value controls how often LinkTest messages are sent.
|
void |
setLogger(LoggerInterface theLogger)
Sets the logger for the current connection.
|
void |
setPort(int port)
Set the TCP/IP port to listen/connect on.
|
void |
setPortManager(PortManager pm)
Sets the port manager for the wrapper.
|
void |
setT3(double newValue)
Sets the reply timeout.
|
void |
setT5(int newValue) |
void |
setT6(int newValue) |
void |
setT7(int newValue) |
void |
setT8(int newValue) |
void |
start() |
void |
stop() |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeConnection
public HSMSWrapper(int port, int deviceId)
public void addMessageHandler(java.lang.Object messageHandler)
addMessageHandler
in interface WrapperInterface
messageHandler
- the message handler to addSecsMsg.processSelf(java.lang.Object)
public void addMessageHandler(java.io.Serializable messageHandler)
addMessageHandler
in interface WrapperInterface
messageHandler
- the message handler to addSecsMsg.processSelf(java.lang.Object)
public abstract boolean connect()
connect
in interface WrapperInterface
public void destroy() throws BadParameterException
BadParameterException
public void disconnect()
disconnect
in interface WrapperInterface
public static double getDefaultLinkTestInterval()
public int getDeviceId()
getDeviceId
in interface WrapperInterface
public double getLinkTestInterval()
LinkTest
public LoggerInterface getLogger()
getLogger
in interface WrapperInterface
public java.util.List<java.lang.Object> getMessageHandlers()
WrapperInterface
getMessageHandlers
in interface WrapperInterface
public int getPort()
getPort
in interface WrapperInterface
public PortManager getPortManager()
getPortManager
in interface WrapperInterface
public SessionManager getRawSessionManager(int deviceId) throws SecsException
deviceId
- the deviceIdSecsException
public SessionManager getSessionManager()
getSessionManager
in interface WrapperInterface
public SessionManager getSessionManager(int deviceId)
getSessionManager
in interface WrapperInterface
deviceId
- the deviceIdpublic double getT3()
WrapperInterface
getT3
in interface WrapperInterface
public int getT5()
public int getT6()
public int getT7()
public int getT8()
public void init() throws BadParameterException
BadParameterException
public void removeMessageHandler(java.lang.Object messageHandler)
removeMessageHandler
in interface WrapperInterface
messageHandler
- the message handler to addSecsMsg.processSelf(java.lang.Object)
public void secsEvent(SecsEvent theEvent)
secsEvent
in interface SecsEventListener
public void setActive(boolean flag)
setActive
in interface WrapperInterface
flag
- true if created session should be made the active session.SessionManager#setActive
public void setDefault(boolean flag)
setDefault
in interface WrapperInterface
flag
- true if created session should be made the default session.SessionManager.setDefault()
public static void setDefaultLinkTestInterval(double defaultLinkTestInterval)
public void setDeviceId(int newValue)
setDeviceId
in interface WrapperInterface
getDeviceId.
public void setLinkTestInterval(double linkTestInterval)
LinkTest
public void setLogger(LoggerInterface theLogger)
setLogger
in interface WrapperInterface
theLogger
- the logger to add.public void setPort(int port)
port
- the TCP/IP port numberpublic void setPortManager(PortManager pm)
setPortManager
in interface WrapperInterface
the
- port manager.public void setT3(double newValue)
WrapperInterface
setT3
in interface WrapperInterface
public void setT5(int newValue)
public void setT6(int newValue)
public void setT7(int newValue)
public void setT8(int newValue)
public void start() throws BadParameterException, VIBUpdateFailedException
public void stop() throws BadParameterException
BadParameterException
Copyright © 1999-2025 ErgoTech Systems, Inc. All Rights Reserved.