public class CstaTcpLink
extends java.lang.Thread
Constructor and Description |
---|
CstaTcpLink()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
createTCPConnection(java.lang.String CstaServerIp,
int Port)
Establish a TCP connection with CSTA Server, if successful, it receives
"SystemStatus" Request, and sends "SystemStatusResponse" immediately.
|
void |
deleteTCPConnection()
deleteTCPConnection - deletes TCP connection
|
CstaTcpModule |
getTcp_listener()
Get the TCP Link's event listener.
|
void |
handleSocketConnectionReset()
handleSocketConnectionReset
|
java.lang.String |
readMessage()
readMessage
|
void |
run()
Receives any messages all the time
|
boolean |
send(java.lang.StringBuffer str)
sends any messages
|
void |
setLinkListener(CstaSystem linkListener) |
void |
setTcp_listener(CstaTcpModule tcpListener)
Set the TCP Link's event listener.
|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public CstaTcpModule getTcp_listener()
public void setTcp_listener(CstaTcpModule tcpListener)
tcpListener
- public boolean createTCPConnection(java.lang.String CstaServerIp, int Port) throws CstaException
CstaServerIp
- : Csta Server IP AddressPort
- : Csta Server Listening PortCstaException
public void deleteTCPConnection()
public boolean send(java.lang.StringBuffer str)
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public java.lang.String readMessage() throws CstaException
CstaException
public void handleSocketConnectionReset() throws CstaException
CstaException
public void setLinkListener(CstaSystem linkListener)