public class EventBusReader extends DataReader
DataEndpoint.StatefieldLineage, recordLineagelastRecord, PRODUCT, PRODUCT_VERSION, VENDOR, XML_INPUT_FACTORY_KEYBUFFER_SIZE, captureElapsedTime, DEFAULT_READ_BUFFER_SIZEid, log, name, TIMESTAMP_FORMAT| Constructor and Description |
|---|
EventBusReader(EventBus eventBus,
int queueCapacity,
Object... topics) |
EventBusReader(EventBus eventBus,
Object... topics) |
| Modifier and Type | Method and Description |
|---|---|
DataException |
addExceptionProperties(DataException exception)
Adds this endpoint's current state to a
DataException. |
int |
available()
Returns the number of records that can probably be read without blocking.
|
void |
close()
Indicates that this endpoint has finished reading or writing.
|
EventBus |
getEventBus() |
EventFilter |
getEventFilter() |
String |
getTopicFieldName()
Returns the field name used to add the delivery topic to each record or
null if the topic should not be added to records (defaults to null). |
Object[] |
getTopics() |
boolean |
isStopOnWriterEOF()
Indicates if this reader should stop reading from the event bus when any event bus writer on the same topic finishes (default to true).
|
void |
open()
Makes this endpoint ready for reading or writing.
|
protected Record |
readImpl()
Overridden by subclasses to read the next record from this
DataReader. |
EventBusReader |
setEventFilter(EventFilter eventFilter) |
EventBusReader |
setStopOnWriterEOF(boolean stopOnReaderEOF)
Indicates if this reader should stop reading from the event bus when any event bus writer on the same topic finishes (default to true).
|
EventBusReader |
setTopicFieldName(String topicFieldName)
Assigns the field name to use when adding the delivery topic to each record or
null if the topic should not be added to records (defaults to null). |
EventBusReader |
setTopics(Object... topics) |
String |
toString() |
addLineage, getBufferSize, getNestedEndpoint, getNestedReader, getReader, getRootEndpoint, getRootReader, isExhausted, isLineageSupported, isSaveLineage, peek, pop, push, read, setSaveLineage, skipdecrementRecordCount, enableJmx, getLastRecord, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, incrementRecordCount, isRecordCountBigInteger, resetRecordCountaddElapsedtime, assertClosed, assertNotOpened, assertOpened, finalize, getClosedOn, getDescription, getElapsedTime, getElapsedTimeAsString, getOpenedOn, getOpenElapsedTime, getOpenElapsedTimeAsString, getSelfTime, getSelfTimeAsString, getState, isCaptureElapsedTime, isClosed, isOpen, setCaptureElapsedTime, setDescriptionpublic EventBus getEventBus()
public Object[] getTopics()
public EventBusReader setTopics(Object... topics)
public String getTopicFieldName()
null if the topic should not be added to records (defaults to null).public EventBusReader setTopicFieldName(String topicFieldName)
null if the topic should not be added to records (defaults to null).public EventFilter getEventFilter()
public EventBusReader setEventFilter(EventFilter eventFilter)
public boolean isStopOnWriterEOF()
public EventBusReader setStopOnWriterEOF(boolean stopOnReaderEOF)
public void open()
throws DataException
DataEndpointopen in class DataEndpointDataExceptionpublic void close()
throws DataException
DataEndpointclose in class DataEndpointDataExceptionpublic int available()
throws DataException
DataReaderavailable in class DataReaderDataExceptionprotected Record readImpl() throws Throwable
DataReaderDataReader. The default
implementation of DataReader.read() now insures that this method will not be called again after it returns
a null.
If no record is available, null will be returned.
readImpl in class DataReaderThrowablepublic DataException addExceptionProperties(DataException exception)
EndpointDataException. Since this method is called whenever an
exception is thrown, subclasses should override it to add their specific information.addExceptionProperties in class DataReaderpublic String toString()
toString in class DataEndpointCopyright (c) 2006-2025 North Concepts Inc. All Rights Reserved.