Package org.flowable.eventregistry.impl
Class DefaultEventRegistry
java.lang.Object
org.flowable.eventregistry.impl.DefaultEventRegistry
- All Implemented Interfaces:
EventRegistry
- Author:
- Joram Barrez
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CorrelationKeyGenerator<Map<String,
Object>> protected EventRegistryEngineConfiguration
protected InboundEventProcessor
protected final org.slf4j.Logger
protected OutboundEventProcessor
protected OutboundEventProcessor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
eventReceived
(InboundChannelModel channelModel, String event) void
eventReceived
(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<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 systemOutboundEventProcessor) TheOutboundEventProcessor
is responsible for handling sending system out events.
-
Field Details
-
logger
protected final org.slf4j.Logger logger -
engineConfiguration
-
correlationKeyGenerator
-
inboundEventProcessor
-
outboundEventProcessor
-
systemOutboundEventProcessor
-
-
Constructor Details
-
DefaultEventRegistry
-
-
Method Details
-
setInboundEventProcessor
Description copied from interface:EventRegistry
TheInboundEventProcessor
is responsible for handling any new event. The event registry will simply pass any event it receives to this instance.- Specified by:
setInboundEventProcessor
in interfaceEventRegistry
-
setOutboundEventProcessor
Description copied from interface:EventRegistry
TheOutboundEventProcessor
is responsible for handling sending out events. The event registry will simply pass any event it needs to send to this instance.- Specified by:
setOutboundEventProcessor
in interfaceEventRegistry
-
getSystemOutboundEventProcessor
- Specified by:
getSystemOutboundEventProcessor
in interfaceEventRegistry
-
setSystemOutboundEventProcessor
Description copied from interface:EventRegistry
TheOutboundEventProcessor
is responsible for handling sending system out events. The event registry will simply pass any event it needs to send to this instance.- Specified by:
setSystemOutboundEventProcessor
in interfaceEventRegistry
-
eventReceived
- Specified by:
eventReceived
in interfaceEventRegistry
-
eventReceived
Description copied from interface:EventRegistry
Events received in adapters should call this method to process events.- Specified by:
eventReceived
in interfaceEventRegistry
-
sendEventToConsumers
Description copied from interface:EventRegistry
Send an event to all the registered event consumers.- Specified by:
sendEventToConsumers
in interfaceEventRegistry
-
sendSystemEventOutbound
Description copied from interface:EventRegistry
Send out theeventInstance
via the given systemOutboundEventProcessor
.- Specified by:
sendSystemEventOutbound
in interfaceEventRegistry
-
sendEventOutbound
Description copied from interface:EventRegistry
Send out theeventInstance
via the givenchannelModel
(s).- Specified by:
sendEventOutbound
in interfaceEventRegistry
-
registerEventRegistryEventConsumer
public void registerEventRegistryEventConsumer(EventRegistryEventConsumer eventRegistryEventBusConsumer) Description copied from interface:EventRegistry
Registers aEventRegistryEventConsumer
instance (a consumer of event registry events which is created by any of the engines).- Specified by:
registerEventRegistryEventConsumer
in interfaceEventRegistry
-
removeFlowableEventRegistryEventConsumer
public void removeFlowableEventRegistryEventConsumer(EventRegistryEventConsumer eventRegistryEventBusConsumer) Description copied from interface:EventRegistry
Removes the event consumer from the event registry- Specified by:
removeFlowableEventRegistryEventConsumer
in interfaceEventRegistry
-
generateKey
Description copied from interface:EventRegistry
Method to generate the unique key used to correlate an event.- Specified by:
generateKey
in interfaceEventRegistry
- Parameters:
data
- data information used to generate the key (must not benull
)- Returns:
- a unique string correlating the event based on the information supplied
-