Interface DocumentSource<T>
- Type Parameters:
T
- document type
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
NullDocumentSource
A configured document source, which represents a session for this channel.
A client can subscribe to this channel by creating a document channel subscription
using
createDocumentSubscription(DocumentChannelListener)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close this source sessioncreateDocumentSubscription
(DocumentChannelListener<T> listener) Create a subscription, which will submit incoming documents to the listenerdefault DocumentBatch<T>
Deprecated.Polling the document source for documents.
-
Method Details
-
createDocumentSubscription
Create a subscription, which will submit incoming documents to the listener- Parameters:
listener
- listener to send documents to- Returns:
- a subscription object, which handles the subscription state
-
poll
Polling the document source for documents. The size of the returned collection is determined by the implementation.- Parameters:
duration
- maximum duration to wait- Returns:
- a collection of documents, or null if no was available in that time
-
poll
Deprecated.Usepoll(Duration)
instead -
close
void close()Close this source session- Specified by:
close
in interfaceAutoCloseable
-
poll(Duration)
instead