Interface StreamBranch
public interface StreamBranch
Stream branches as java objects.
Used to access consumers on branches and push data directly from the branch itself
- Since:
- 1.3
-
Method Summary
Modifier and TypeMethodDescriptionRemove all subscribers from this branchList<StreamConsumer<?>>List all consumers on the branch.getKey()<D> CompletionStage<?>push(D data) Send specifieddatato all subscribers on this branch directly
-
Method Details
-
getKey
String getKey()- Returns:
- name of the branch
-
getConsumers
List<StreamConsumer<?>> getConsumers()List all consumers on the branch.- Returns:
- list of
StreamConsumer, nevernull
-
push
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
-