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, waitinitializeConnectionpublic HSMSWrapper(int port,
int deviceId)
public void addMessageHandler(java.lang.Object messageHandler)
addMessageHandler in interface WrapperInterfacemessageHandler - the message handler to addSecsMsg.processSelf(java.lang.Object)public void addMessageHandler(java.io.Serializable messageHandler)
addMessageHandler in interface WrapperInterfacemessageHandler - the message handler to addSecsMsg.processSelf(java.lang.Object)public abstract boolean connect()
connect in interface WrapperInterfacepublic void destroy()
throws BadParameterException
BadParameterExceptionpublic void disconnect()
disconnect in interface WrapperInterfacepublic static double getDefaultLinkTestInterval()
public int getDeviceId()
getDeviceId in interface WrapperInterfacepublic double getLinkTestInterval()
LinkTestpublic LoggerInterface getLogger()
getLogger in interface WrapperInterfacepublic java.util.List<java.lang.Object> getMessageHandlers()
WrapperInterfacegetMessageHandlers in interface WrapperInterfacepublic int getPort()
getPort in interface WrapperInterfacepublic PortManager getPortManager()
getPortManager in interface WrapperInterfacepublic SessionManager getRawSessionManager(int deviceId) throws SecsException
deviceId - the deviceIdSecsExceptionpublic SessionManager getSessionManager()
getSessionManager in interface WrapperInterfacepublic SessionManager getSessionManager(int deviceId)
getSessionManager in interface WrapperInterfacedeviceId - the deviceIdpublic double getT3()
WrapperInterfacegetT3 in interface WrapperInterfacepublic int getT5()
public int getT6()
public int getT7()
public int getT8()
public void init()
throws BadParameterException
BadParameterExceptionpublic void removeMessageHandler(java.lang.Object messageHandler)
removeMessageHandler in interface WrapperInterfacemessageHandler - the message handler to addSecsMsg.processSelf(java.lang.Object)public void secsEvent(SecsEvent theEvent)
secsEvent in interface SecsEventListenerpublic void setActive(boolean flag)
setActive in interface WrapperInterfaceflag - true if created session should be made the active session.SessionManager#setActivepublic void setDefault(boolean flag)
setDefault in interface WrapperInterfaceflag - 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 WrapperInterfacegetDeviceId.public void setLinkTestInterval(double linkTestInterval)
LinkTestpublic void setLogger(LoggerInterface theLogger)
setLogger in interface WrapperInterfacetheLogger - the logger to add.public void setPort(int port)
port - the TCP/IP port numberpublic void setPortManager(PortManager pm)
setPortManager in interface WrapperInterfacethe - port manager.public void setT3(double newValue)
WrapperInterfacesetT3 in interface WrapperInterfacepublic 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
BadParameterExceptionCopyright © 1999-2025 ErgoTech Systems, Inc. All Rights Reserved.