static final class PushStreamProvider.PushEventPipe<T> extends java.lang.Object implements PushEventConsumer<T>, PushEventSource<T>
| Modifier and Type | Field and Description |
|---|---|
(package private) PushEventConsumer<? super T> |
delegate |
ABORT, CONTINUE| Constructor and Description |
|---|
PushEventPipe() |
| Modifier and Type | Method and Description |
|---|---|
long |
accept(PushEvent<? extends T> event)
Accept an event from a source.
|
java.lang.AutoCloseable |
open(PushEventConsumer<? super T> pec)
Open the asynchronous channel between the source and the consumer.
|
volatile PushEventConsumer<? super T> delegate
public java.lang.AutoCloseable open(PushEventConsumer<? super T> pec) throws java.lang.Exception
PushEventSourceAutoCloseable. This can be closed, and should
close the channel, including sending a Close event if the channel was not
already closed. The returned object must be able to be closed multiple
times without sending more than one Close events.open in interface PushEventSource<T>pec - the consumer (not null)AutoCloseable that can be used to close the streamjava.lang.Exceptionpublic long accept(PushEvent<? extends T> event) throws java.lang.Exception
PushEventConsumeraccept in interface PushEventConsumer<T>event - The eventjava.lang.Exception - to indicate that an error has occurred and that no
further events should be delivered to this
PushEventConsumer