public interface EventBus
Modifier and Type | Interface and Description |
---|---|
static class |
EventBus.PublishResult
Signals if a publish call was successful and if not why.
|
Modifier and Type | Method and Description |
---|---|
EventBus.PublishResult |
publish(Event event)
Try to publish an event.
|
Mono<Void> |
start()
Starts the event bus if it hasn't been started yet.
|
Mono<Void> |
stop(Duration timeout)
Stops the event bus if it hasn't been stopped already.
|
EventSubscription |
subscribe(Consumer<Event> consumer)
|
void |
unsubscribe(EventSubscription subscription)
|
EventBus.PublishResult publish(Event event)
event
- the event to publish.EventBus.PublishResult
of th event.EventSubscription subscribe(Consumer<Event> consumer)
consumer
- the consumer which will receive events.EventSubscription
that can be used to unsubscribe.void unsubscribe(EventSubscription subscription)
subscription
- the subscription used.Copyright © 2021 Couchbase, Inc.. All rights reserved.