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 EventRegistryEngineConfigurationprotected InboundEventProcessorprotected final org.slf4j.Loggerprotected OutboundEventProcessorprotected OutboundEventProcessor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoideventReceived(InboundChannelModel channelModel, String event) voideventReceived(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.voidregisterEventRegistryEventConsumer(EventRegistryEventConsumer eventRegistryEventBusConsumer) Registers aEventRegistryEventConsumerinstance (a consumer of event registry events which is created by any of the engines).voidremoveFlowableEventRegistryEventConsumer(EventRegistryEventConsumer eventRegistryEventBusConsumer) Removes the event consumer from the event registryvoidsendEventOutbound(EventInstance eventInstance, Collection<ChannelModel> channelModels) Send out theeventInstancevia the givenchannelModel(s).voidsendEventToConsumers(EventRegistryEvent eventRegistryEvent) Send an event to all the registered event consumers.voidsendSystemEventOutbound(EventInstance eventInstance) Send out theeventInstancevia the given systemOutboundEventProcessor.voidsetInboundEventProcessor(InboundEventProcessor inboundEventProcessor) TheInboundEventProcessoris responsible for handling any new event.voidsetOutboundEventProcessor(OutboundEventProcessor outboundEventProcessor) TheOutboundEventProcessoris responsible for handling sending out events.voidsetSystemOutboundEventProcessor(OutboundEventProcessor systemOutboundEventProcessor) TheOutboundEventProcessoris 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:EventRegistryTheInboundEventProcessoris responsible for handling any new event. The event registry will simply pass any event it receives to this instance.- Specified by:
setInboundEventProcessorin interfaceEventRegistry
-
setOutboundEventProcessor
Description copied from interface:EventRegistryTheOutboundEventProcessoris responsible for handling sending out events. The event registry will simply pass any event it needs to send to this instance.- Specified by:
setOutboundEventProcessorin interfaceEventRegistry
-
getSystemOutboundEventProcessor
- Specified by:
getSystemOutboundEventProcessorin interfaceEventRegistry
-
setSystemOutboundEventProcessor
Description copied from interface:EventRegistryTheOutboundEventProcessoris responsible for handling sending system out events. The event registry will simply pass any event it needs to send to this instance.- Specified by:
setSystemOutboundEventProcessorin interfaceEventRegistry
-
eventReceived
- Specified by:
eventReceivedin interfaceEventRegistry
-
eventReceived
Description copied from interface:EventRegistryEvents received in adapters should call this method to process events.- Specified by:
eventReceivedin interfaceEventRegistry
-
sendEventToConsumers
Description copied from interface:EventRegistrySend an event to all the registered event consumers.- Specified by:
sendEventToConsumersin interfaceEventRegistry
-
sendSystemEventOutbound
Description copied from interface:EventRegistrySend out theeventInstancevia the given systemOutboundEventProcessor.- Specified by:
sendSystemEventOutboundin interfaceEventRegistry
-
sendEventOutbound
Description copied from interface:EventRegistrySend out theeventInstancevia the givenchannelModel(s).- Specified by:
sendEventOutboundin interfaceEventRegistry
-
registerEventRegistryEventConsumer
public void registerEventRegistryEventConsumer(EventRegistryEventConsumer eventRegistryEventBusConsumer) Description copied from interface:EventRegistryRegisters aEventRegistryEventConsumerinstance (a consumer of event registry events which is created by any of the engines).- Specified by:
registerEventRegistryEventConsumerin interfaceEventRegistry
-
removeFlowableEventRegistryEventConsumer
public void removeFlowableEventRegistryEventConsumer(EventRegistryEventConsumer eventRegistryEventBusConsumer) Description copied from interface:EventRegistryRemoves the event consumer from the event registry- Specified by:
removeFlowableEventRegistryEventConsumerin interfaceEventRegistry
-
generateKey
Description copied from interface:EventRegistryMethod to generate the unique key used to correlate an event.- Specified by:
generateKeyin 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
-