@ThreadSafe public final class TcpClientProvider extends AisBusProvider implements Runnable, Consumer<AisPacket>, IClientStoppedListener
blockingfilters, packetTransformers, status, THREAD_STOP_WAIT_MAX| Constructor and Description |
|---|
TcpClientProvider()
Instantiates a new Tcp client provider.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(AisPacket packet) |
void |
cancel()
All components must implement a way to stop
|
void |
clientStopped(TcpClient client)
Client stopped.
|
List<String> |
getHostsPorts()
Gets hosts ports.
|
void |
init()
Initialize the component after configuration.
|
void |
run() |
void |
setClientConf(TcpClientConf clientConf)
Sets client conf.
|
void |
setHostsPorts(List<String> hostsPorts)
Sets hosts ports.
|
void |
setReconnectInterval(int reconnectInterval)
Sets reconnect interval.
|
void |
setTimeout(int timeout)
Sets timeout.
|
void |
start()
Start the component.
|
pushgetAisBus, getDescription, getName, setAisBus, setDescription, setNamegetFilters, getPacketTransformers, getStatus, getThread, handleReceived, rateReport, setConnected, setNotConnected, setStopped, setThread, toStringpublic TcpClientProvider()
public void start()
AisBusComponentstart in class AisBusProviderpublic void cancel()
AisBusComponentcancel in class AisBusComponentpublic void init()
AisBusComponentinit in class AisBusProviderpublic void setHostsPorts(List<String> hostsPorts)
hostsPorts - the hosts portspublic void setClientConf(TcpClientConf clientConf)
clientConf - the client confpublic void setTimeout(int timeout)
timeout - the timeoutpublic void setReconnectInterval(int reconnectInterval)
reconnectInterval - the reconnect intervalpublic void clientStopped(TcpClient client)
IClientStoppedListenerclientStopped in interface IClientStoppedListenerclient - the clientCopyright © 2011–2019 Danish Maritime Authority. All rights reserved.