public interface EventBus extends SubscribableMessageSource<EventMessage<?>>, MessageDispatchInterceptorSupport<EventMessage<?>>
EventMessageHandler
,
SimpleEventBus
Modifier and Type | Method and Description |
---|---|
default void |
publish(EventMessage<?>... events)
Publish a collection of events on this bus (one, or multiple).
|
void |
publish(List<? extends EventMessage<?>> events)
Publish a collection of events on this bus (one, or multiple).
|
Registration |
registerDispatchInterceptor(MessageDispatchInterceptor<? super EventMessage<?>> dispatchInterceptor)
Register the given
interceptor with this bus. |
subscribe
default void publish(EventMessage<?>... events)
Implementations may treat the given events
as a single batch and distribute the events as such to
all subscribed EventListeners.
events
- The collection of events to publishvoid publish(List<? extends EventMessage<?>> events)
Implementations may treat the given events
as a single batch and distribute the events as such to
all subscribed EventListeners.
events
- The collection of events to publishRegistration registerDispatchInterceptor(MessageDispatchInterceptor<? super EventMessage<?>> dispatchInterceptor)
interceptor
with this bus. When subscribed it will intercept any event messages
published on this bus.
If the given interceptor
is already registered, nothing happens.
registerDispatchInterceptor
in interface MessageDispatchInterceptorSupport<EventMessage<?>>
dispatchInterceptor
- The event message dispatch interceptor to registerdispatchInterceptor
. When unregistered it will no longer be given
event messages published on this bus.Copyright © 2010–2020. All rights reserved.