Class OMRSEventListener
java.lang.Object
org.odpi.openmetadata.repositoryservices.eventmanagement.OMRSEventListener
- All Implemented Interfaces:
OMRSTopicListener
,OMRSTopicRepositoryEventListener
The OMRSEventListener manages inbound events from the metadata repository cohort. There are two main groups of events: registration events that are handled by the OMRSCohortRegistry and metadata events that describe changes to TypeDefs and metadata instances. The metadata events are handled by the local connector.
The role of the OMRSEventListener is to decide which events to process. This is controlled by the synchronization rule passed on the constructor.
-
Constructor Summary
ConstructorDescriptionOMRSEventListener
(String cohortName, String localMetadataCollectionId, OMRSRegistryEventProcessor registryEventProcessor, OMRSRepositoryEventProcessor repositoryEventProcessor, OpenMetadataEventsSecurity securityVerifier, AuditLog auditLog) Default Constructor saves configuration parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoid
processInstanceEvent
(OMRSInstanceEvent instanceEvent) Unpack and deliver an instance event to the InstanceEventProcessorvoid
processRegistryEvent
(OMRSRegistryEvent registryEvent) The event contains a registry event.void
processTypeDefEvent
(OMRSTypeDefEvent typeDefEvent) Unpack and deliver a TypeDef event to the TypeDefEventProcessor
-
Constructor Details
-
OMRSEventListener
public OMRSEventListener(String cohortName, String localMetadataCollectionId, OMRSRegistryEventProcessor registryEventProcessor, OMRSRepositoryEventProcessor repositoryEventProcessor, OpenMetadataEventsSecurity securityVerifier, AuditLog auditLog) Default Constructor saves configuration parameters.- Parameters:
cohortName
- name of the cohort that this event listener belongs tolocalMetadataCollectionId
- unique identifier for the local metadata collectionregistryEventProcessor
- processor for registry eventsrepositoryEventProcessor
- processor for TypeDef and Instance synchronization eventssecurityVerifier
- new security verifierauditLog
- audit log for this component.
-
-
Method Details
-
processRegistryEvent
The event contains a registry event. It needs to be further unpacked and passed to the appropriate registry event processor (OMRSCohortRegistry).- Specified by:
processRegistryEvent
in interfaceOMRSTopicListener
- Parameters:
registryEvent
- event to unpack
-
processTypeDefEvent
Unpack and deliver a TypeDef event to the TypeDefEventProcessor- Specified by:
processTypeDefEvent
in interfaceOMRSTopicRepositoryEventListener
- Parameters:
typeDefEvent
- event to unpack
-
processInstanceEvent
Unpack and deliver an instance event to the InstanceEventProcessor- Specified by:
processInstanceEvent
in interfaceOMRSTopicRepositoryEventListener
- Parameters:
instanceEvent
- event to unpack
-