Interface StreamConsumer<T>
-
- Type Parameters:
T- type of the subscription request argument
- All Superinterfaces:
AsynchronousCloseable,AutoCloseable
public interface StreamConsumer<T> extends AsynchronousCloseable
Accepted stream consumer.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TgetArg()StringgetBranch()InstancegetCaller()CompletionStage<Void>onClose()Return a stage that will complete whenAsynchronousCloseable.closeAsync()is called and shutdown completes.CompletionStage<Void>onOpen()Returns a stage that will complete when the stream is subscribed.<E> CompletionStage<?>send(E data)-
Methods inherited from interface com.tick42.glue.core.AsynchronousCloseable
close, closeAsync
-
-
-
-
Method Detail
-
getArg
T getArg()
-
getCaller
Instance getCaller()
-
getBranch
String getBranch()
-
send
<E> CompletionStage<?> send(E data)
-
onOpen
CompletionStage<Void> onOpen()
Returns a stage that will complete when the stream is subscribed.- Returns:
- A stage that will complete when the stream is subscribed, never
null - Since:
- 1.1
-
onClose
CompletionStage<Void> onClose()
Description copied from interface:AsynchronousCloseableReturn a stage that will complete whenAsynchronousCloseable.closeAsync()is called and shutdown completes.- Specified by:
onClosein interfaceAsynchronousCloseable- Returns:
- a stage that will complete when shutdown is complete, never
null
-
-