Package com.couchbase.client.core.cnc
Interface EventBus
- All Known Implementing Classes:
DefaultEventBus,SimpleEventBus
public interface EventBus
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumSignals if a publish call was successful and if not why. -
Method Summary
Modifier and TypeMethodDescriptionTry to publish an event.reactor.core.publisher.Mono<Void> start()Starts the event bus if it hasn't been started yet.reactor.core.publisher.Mono<Void> Stops the event bus if it hasn't been stopped already.voidunsubscribe(EventSubscription subscription)
-
Method Details
-
publish
Try to publish an event.- Parameters:
event- the event to publish.- Returns:
- the
EventBus.PublishResultof th event.
-
subscribe
- Parameters:
consumer- the consumer which will receive events.- Returns:
- a
EventSubscriptionthat can be used to unsubscribe.
-
unsubscribe
- Parameters:
subscription- the subscription used.
-
start
reactor.core.publisher.Mono<Void> start()Starts the event bus if it hasn't been started yet. -
stop
Stops the event bus if it hasn't been stopped already.
-