Class NoopEventBridge
java.lang.Object
org.apache.cayenne.event.EventBridge
org.apache.cayenne.event.NoopEventBridge
- All Implemented Interfaces:
EventListener
- Since:
- 4.0
-
Field Summary
Fields inherited from class EventBridge
eventManager, externalEventSource, externalSubject, localSubjects, mode, RECEIVE_EXTERNAL, RECEIVE_LOCAL, RECEIVE_LOCAL_EXTERNALModifier and TypeFieldDescriptionprotected EventManagerprotected Objectprotected Stringprotected Collection<EventSubject> protected intstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionprotected voidsendExternalEvent(CayenneEvent localEvent) Sends a Cayenne event over the transport supported by this bridge.protected voidShuts down the external interface of the EventBridge, cleaning up and releasing any resources used to communicate external events.protected voidStarts an external interface of the EventBridge.Methods inherited from class EventBridge
convertToExternalSubject, getEventManager, getExternalEventSource, getExternalSubject, getLocalSubjects, isRunning, onExternalEvent, receivesExternalEvents, receivesLocalEvents, shutdown, startup, startup, startupModifier and TypeMethodDescriptionstatic StringconvertToExternalSubject(EventSubject localSubject) A utility method that performs consistent translation from an EventSubject to a String that can be used by external transport as subject for distributed communications.Returns local EventManager used by the bridge.Returns an object used as a source of local events posted in response to remote events.Returns a String subject used to post distributed events.Returns a Collection of local EventSubjects.booleanReturns true if this bridge is active.protected voidonExternalEvent(CayenneEvent event) Helper method intended to be called explicitly by subclasses to asynchronously post an event obtained from a remote source.booleanReturns true if the bridge is configured to receive external events.booleanReturns true if the bridge is configured to receive local events from its internal EventManager.voidshutdown()Stops listening for events on both local and external interfaces.voidstartup(EventManager eventManager, int mode) Starts EventBridge in the specified mode and locally listening to all event sources that post on a preconfigured subject.voidstartup(EventManager eventManager, int mode, Object localEventSource) Starts EventBridge in the specified mode and locally listening to a specified event source.voidstartup(EventManager eventManager, int mode, Object localEventSource, Object remoteEventSource) Starts EventBridge in the specified mode.
-
Method Details
-
startupExternal
Description copied from class:EventBridgeStarts an external interface of the EventBridge.- Specified by:
startupExternalin classEventBridge- Throws:
Exception
-
shutdownExternal
Description copied from class:EventBridgeShuts down the external interface of the EventBridge, cleaning up and releasing any resources used to communicate external events.- Specified by:
shutdownExternalin classEventBridge- Throws:
Exception
-
sendExternalEvent
Description copied from class:EventBridgeSends a Cayenne event over the transport supported by this bridge.- Specified by:
sendExternalEventin classEventBridge- Throws:
Exception
-