public class DefaultEventRegistry extends Object implements EventRegistry
| Modifier and Type | Field and Description |
|---|---|
protected CorrelationKeyGenerator<Map<String,Object>> |
correlationKeyGenerator |
protected EventRegistryEngineConfiguration |
engineConfiguration |
protected InboundEventProcessor |
inboundEventProcessor |
protected OutboundEventProcessor |
outboundEventProcessor |
protected OutboundEventProcessor |
systemOutboundEventProcessor |
| Constructor and Description |
|---|
DefaultEventRegistry(EventRegistryEngineConfiguration engineConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
void |
eventReceived(InboundChannelModel channelModel,
String event)
Events received in adapters should call this method to process events.
|
String |
generateKey(Map<String,Object> data)
Method to generate the unique key used to correlate an event.
|
OutboundEventProcessor |
getSystemOutboundEventProcessor() |
void |
registerEventRegistryEventConsumer(EventRegistryEventConsumer eventRegistryEventBusConsumer)
Registers a
EventRegistryEventConsumer 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 registry
|
void |
sendEventOutbound(EventInstance eventInstance,
Collection<ChannelModel> channelModels)
Send out the
eventInstance via the given channelModel(s). |
void |
sendEventToConsumers(EventRegistryEvent eventRegistryEvent)
Send an event to all the registered event consumers.
|
void |
sendSystemEventOutbound(EventInstance eventInstance)
Send out the
eventInstance via the given system OutboundEventProcessor. |
void |
setInboundEventProcessor(InboundEventProcessor inboundEventProcessor)
The
InboundEventProcessor is responsible for handling any new event. |
void |
setOutboundEventProcessor(OutboundEventProcessor outboundEventProcessor)
The
OutboundEventProcessor is responsible for handling sending out events. |
void |
setSystemOutboundEventProcessor(OutboundEventProcessor systemOutboundEventProcessor)
The
OutboundEventProcessor is responsible for handling sending system out events. |
protected EventRegistryEngineConfiguration engineConfiguration
protected CorrelationKeyGenerator<Map<String,Object>> correlationKeyGenerator
protected InboundEventProcessor inboundEventProcessor
protected OutboundEventProcessor outboundEventProcessor
protected OutboundEventProcessor systemOutboundEventProcessor
public DefaultEventRegistry(EventRegistryEngineConfiguration engineConfiguration)
public void setInboundEventProcessor(InboundEventProcessor inboundEventProcessor)
EventRegistryInboundEventProcessor is responsible for handling any new event.
The event registry will simply pass any event it receives to this instance.setInboundEventProcessor in interface EventRegistrypublic void setOutboundEventProcessor(OutboundEventProcessor outboundEventProcessor)
EventRegistryOutboundEventProcessor is responsible for handling sending out events.
The event registry will simply pass any event it needs to send to this instance.setOutboundEventProcessor in interface EventRegistrypublic OutboundEventProcessor getSystemOutboundEventProcessor()
getSystemOutboundEventProcessor in interface EventRegistrypublic void setSystemOutboundEventProcessor(OutboundEventProcessor systemOutboundEventProcessor)
EventRegistryOutboundEventProcessor is responsible for handling sending system out events.
The event registry will simply pass any event it needs to send to this instance.setSystemOutboundEventProcessor in interface EventRegistrypublic void eventReceived(InboundChannelModel channelModel, String event)
EventRegistryeventReceived in interface EventRegistrypublic void sendEventToConsumers(EventRegistryEvent eventRegistryEvent)
EventRegistrysendEventToConsumers in interface EventRegistrypublic void sendSystemEventOutbound(EventInstance eventInstance)
EventRegistryeventInstance via the given system OutboundEventProcessor.sendSystemEventOutbound in interface EventRegistrypublic void sendEventOutbound(EventInstance eventInstance, Collection<ChannelModel> channelModels)
EventRegistryeventInstance via the given channelModel(s).sendEventOutbound in interface EventRegistrypublic void registerEventRegistryEventConsumer(EventRegistryEventConsumer eventRegistryEventBusConsumer)
EventRegistryEventRegistryEventConsumer instance (a consumer of event registry events which
is created by any of the engines).registerEventRegistryEventConsumer in interface EventRegistrypublic void removeFlowableEventRegistryEventConsumer(EventRegistryEventConsumer eventRegistryEventBusConsumer)
EventRegistryremoveFlowableEventRegistryEventConsumer in interface EventRegistrypublic String generateKey(Map<String,Object> data)
EventRegistrygenerateKey in interface EventRegistrydata - data information used to generate the key (must not be null)Copyright © 2023 Flowable. All rights reserved.