@ThreadSafe public abstract class TcpClient extends Thread
Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
protected TcpClientConf |
conf
The Conf.
|
protected Socket |
socket
The Socket.
|
protected AisBusComponentStatus |
status
The Status.
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
TcpClient(IClientStoppedListener stopListener,
Socket socket,
TcpClientConf conf)
Instantiates a new Tcp client.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Stop the client
|
String |
getRemoteHost()
Gets remote host.
|
AisBusComponentStatus |
getStatus()
Get status for "component"
|
String |
rateReport()
Rate report string.
|
protected void |
stopping()
Method must be called before the thread stops
|
activeCount, checkAccess, clone, 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, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldprotected final TcpClientConf conf
protected final Socket socket
protected final AisBusComponentStatus status
public TcpClient(IClientStoppedListener stopListener, Socket socket, TcpClientConf conf)
stopListener - the stop listenersocket - the socketconf - the confpublic AisBusComponentStatus getStatus()
public String getRemoteHost()
protected void stopping()
public void cancel()
public String rateReport()
Copyright © 2011–2019 Danish Maritime Authority. All rights reserved.