?? PushEventSource<T>
- ????:
T
- The payload type
- ???????:
SimplePushEventSource<T>
- ????:
- ????????, ????? lambda ??????????????
An event source. An event source can open a channel between a source and a
consumer. Once the channel is opened (even before it returns) the source can
send events to the consumer.
A source should stop sending and automatically close the channel when sending
an event returns a negative value, see
PushEventConsumer.ABORT
.
Values that are larger than 0 should be treated as a request to delay the
next events with those number of milliseconds.-
????
??????????open
(PushEventConsumer<? super T> aec) Open the asynchronous channel between the source and the consumer.
-
??????
-
open
Open the asynchronous channel between the source and the consumer. The call returns anAutoCloseable
. 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.- ??:
aec
- the consumer (not null)- ??:
- a
AutoCloseable
that can be used to close the stream - ??:
Exception
-