@ThreadSafe public class TcpWriterConsumer extends AisBusConsumer implements Runnable, IClientStoppedListener
blockingfilters, packetTransformers, status, THREAD_STOP_WAIT_MAX| Constructor and Description |
|---|
TcpWriterConsumer()
Instantiates a new Tcp writer consumer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
All components must implement a way to stop
|
void |
clientStopped(TcpClient client)
Client stopped.
|
TcpClientConf |
getClientConf()
Gets client conf.
|
String |
getHost()
Gets host.
|
int |
getPort()
Gets port.
|
int |
getReconnectInterval()
Gets reconnect interval.
|
void |
receiveFiltered(AisBusElement queueElement)
All consumers must implement a method to get the filtered packet
|
void |
run()
Connect and reconnect
|
void |
setClientConf(TcpClientConf clientConf)
Sets client conf.
|
void |
setHost(String host)
Sets host.
|
void |
setPort(int port)
Sets port.
|
void |
setReconnectInterval(int reconnectInterval)
Sets reconnect interval.
|
void |
start()
Start the component.
|
init, push, receive, setConsumerPullMaxElements, setConsumerQueueSizegetAisBus, getDescription, getName, setAisBus, setDescription, setNamegetFilters, getPacketTransformers, getStatus, getThread, handleReceived, rateReport, setConnected, setNotConnected, setStopped, setThread, toStringpublic TcpWriterConsumer()
public void receiveFiltered(AisBusElement queueElement)
AisBusConsumerreceiveFiltered in class AisBusConsumerqueueElement - the queue elementpublic void start()
AisBusComponentstart in class AisBusConsumerpublic void cancel()
AisBusComponentcancel in class AisBusConsumerpublic int getPort()
public void setPort(int port)
port - the portpublic String getHost()
public void setHost(String host)
host - the hostpublic int getReconnectInterval()
public void setReconnectInterval(int reconnectInterval)
reconnectInterval - the reconnect intervalpublic TcpClientConf getClientConf()
public void setClientConf(TcpClientConf clientConf)
clientConf - the client confpublic void clientStopped(TcpClient client)
IClientStoppedListenerclientStopped in interface IClientStoppedListenerclient - the clientCopyright © 2011–2019 Danish Maritime Authority. All rights reserved.