@ThreadSafe public abstract class AisBusConsumer extends AisBusSocket implements IQueueEntryHandler<AisBusElement>
blockingfilters, packetTransformers, status, THREAD_STOP_WAIT_MAX| Constructor and Description |
|---|
AisBusConsumer()
Instantiates a new Ais bus consumer.
|
AisBusConsumer(boolean blocking)
Instantiates a new Ais bus consumer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
All components must implement a way to stop
|
void |
init()
Initialize the component after configuration.
|
void |
push(AisBusElement element)
Push elements onto the queue
|
void |
receive(AisBusElement queueElement)
Receive elements from the queue
|
abstract void |
receiveFiltered(AisBusElement queueElement)
All consumers must implement a method to get the filtered packet
|
void |
setConsumerPullMaxElements(int consumerPullMaxElements)
Sets consumer pull max elements.
|
void |
setConsumerQueueSize(int consumerQueueSize)
Sets consumer queue size.
|
void |
start()
Start the component.
|
getAisBus, getDescription, getName, setAisBus, setDescription, setNamegetFilters, getPacketTransformers, getStatus, getThread, handleReceived, rateReport, setConnected, setNotConnected, setStopped, setThread, toStringpublic AisBusConsumer()
public AisBusConsumer(boolean blocking)
blocking - the blockingpublic final void receive(AisBusElement queueElement)
receive in interface IQueueEntryHandler<AisBusElement>queueElement - the queue entrypublic final void push(AisBusElement element)
element - the elementpublic void init()
AisBusComponentinit in class AisBusSocketpublic void start()
AisBusComponentstart in class AisBusSocketpublic void cancel()
AisBusComponentcancel in class AisBusComponentpublic abstract void receiveFiltered(AisBusElement queueElement)
queueElement - the queue elementpublic void setConsumerQueueSize(int consumerQueueSize)
consumerQueueSize - the consumer queue sizepublic void setConsumerPullMaxElements(int consumerPullMaxElements)
consumerPullMaxElements - the consumer pull max elementsCopyright © 2011–2019 Danish Maritime Authority. All rights reserved.