Interface StreamBranch
-
public interface StreamBranchStream branches as java objects. Used to access consumers on branches and push data directly from the branch itself- Since:
- 1.3
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletionStage<Void>closeAsync()Remove all subscribers from this branchList<StreamConsumer<?>>getConsumers()List all consumers on the branch.StringgetKey()<D> CompletionStage<?>push(D data)Send specifieddatato all subscribers on this branch directly
-
-
-
Method Detail
-
getKey
String getKey()
- Returns:
- name of the branch
-
getConsumers
List<StreamConsumer<?>> getConsumers()
List all consumers on the branch.- Returns:
- list of
StreamConsumer, nevernull
-
push
<D> CompletionStage<?> push(D data)
Send specifieddatato all subscribers on this branch directly- Type Parameters:
D- type of the data- Parameters:
data- data to be sent- Returns:
- a stage that will complete when data is sent, never
null
-
closeAsync
CompletionStage<Void> closeAsync()
Remove all subscribers from this branch- Returns:
- a stage that will complete when all branch subscribers have been closed, never
null
-
-