T - the message typepublic final class Pull2Push<T> extends Object implements Runnable, AutoCloseable
The class pulls from a set of event sources, and pushes to a single EventHandler. If the downstream event handler blocks, this will block, providing a simple rate limiting scheme.
The EventSources are managed in a basic Queue.
| Constructor and Description |
|---|
Pull2Push(EventHandler<T> output) |
public Pull2Push(EventHandler<T> output)
output - the EventHandler that receives the messages from this
Pull2Push.public void register(EventSource<T> source)
source - The source that will be added to the queue of this
Pull2Pushpublic void close() throws Exception
close in interface AutoCloseableExceptionCopyright © 2017 The Apache Software Foundation. All rights reserved.