Package org.flowable.eventregistry.api
Interface EventRegistry
public interface EventRegistry
Central registry for events that are received through external channels through a
InboundEventChannelAdapter
and then passed through as a event registry event.- Author:
- Joram Barrez
-
Method Summary
Modifier and TypeMethodDescriptionvoid
eventReceived
(org.flowable.eventregistry.model.InboundChannelModel channelModel, String event) void
eventReceived
(org.flowable.eventregistry.model.InboundChannelModel channelModel, InboundEvent event) Events received in adapters should call this method to process events.generateKey
(Map<String, Object> data) Method to generate the unique key used to correlate an event.void
registerEventRegistryEventConsumer
(EventRegistryEventConsumer eventRegistryEventBusConsumer) Registers aEventRegistryEventConsumer
instance (a consumer of event registry events which is created by any of the engines).void
removeFlowableEventRegistryEventConsumer
(EventRegistryEventConsumer eventRegistryEventBusConsumer) Removes the event consumer from the event registryvoid
sendEventOutbound
(EventInstance eventInstance, Collection<org.flowable.eventregistry.model.ChannelModel> channelModels) Send out theeventInstance
via the givenchannelModel
(s).void
sendEventToConsumers
(EventRegistryEvent eventRegistryEvent) Send an event to all the registered event consumers.void
sendSystemEventOutbound
(EventInstance eventInstance) Send out theeventInstance
via the given systemOutboundEventProcessor
.void
setInboundEventProcessor
(InboundEventProcessor inboundEventProcessor) TheInboundEventProcessor
is responsible for handling any new event.void
setOutboundEventProcessor
(OutboundEventProcessor outboundEventProcessor) TheOutboundEventProcessor
is responsible for handling sending out events.void
setSystemOutboundEventProcessor
(OutboundEventProcessor outboundEventProcessor) TheOutboundEventProcessor
is responsible for handling sending system out events.
-
Method Details
-
setInboundEventProcessor
TheInboundEventProcessor
is responsible for handling any new event. The event registry will simply pass any event it receives to this instance. -
setOutboundEventProcessor
TheOutboundEventProcessor
is responsible for handling sending out events. The event registry will simply pass any event it needs to send to this instance. -
getSystemOutboundEventProcessor
OutboundEventProcessor getSystemOutboundEventProcessor() -
setSystemOutboundEventProcessor
TheOutboundEventProcessor
is responsible for handling sending system out events. The event registry will simply pass any event it needs to send to this instance. -
registerEventRegistryEventConsumer
Registers aEventRegistryEventConsumer
instance (a consumer of event registry events which is created by any of the engines). -
removeFlowableEventRegistryEventConsumer
void removeFlowableEventRegistryEventConsumer(EventRegistryEventConsumer eventRegistryEventBusConsumer) Removes the event consumer from the event registry -
generateKey
Method to generate the unique key used to correlate an event.- Parameters:
data
- data information used to generate the key (must not benull
)- Returns:
- a unique string correlating the event based on the information supplied
-
eventReceived
-
eventReceived
void eventReceived(org.flowable.eventregistry.model.InboundChannelModel channelModel, InboundEvent event) Events received in adapters should call this method to process events. -
sendEventToConsumers
Send an event to all the registered event consumers. -
sendSystemEventOutbound
Send out theeventInstance
via the given systemOutboundEventProcessor
. -
sendEventOutbound
void sendEventOutbound(EventInstance eventInstance, Collection<org.flowable.eventregistry.model.ChannelModel> channelModels) Send out theeventInstance
via the givenchannelModel
(s).
-