Class OMRSRegistryEvent
java.lang.Object
org.odpi.openmetadata.repositoryservices.events.OMRSEvent
org.odpi.openmetadata.repositoryservices.events.OMRSRegistryEvent
OMRSRegistryEvent provides the conversion between the properties of a registry event and the serialized event body.
It supports conversion in either direction through its inner class called OMRSRegistryEventPayload:
- Converting from registry event properties to an OMRSEvent body for sending outbound events.
- Converting from an event body to registry event properties for inbound events.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.repositoryservices.events.OMRSEvent
errorMessage, eventCategory, eventDirection, eventOriginator, eventTimestamp, genericErrorCode, otherAttributeTypeDef, otherInstanceGUID, otherMetadataCollectionId, otherOrigin, otherTypeDef, otherTypeDefSummary, targetAttributeTypeDef, targetInstanceGUID, targetMetadataCollectionId, targetRemoteConnection, targetTypeDefSummary
-
Constructor Summary
ConstructorDescriptionOMRSRegistryEvent
(OMRSEventV1 inboundEvent) Inbound event constructor that takes the object created by the Jackson JSON mapper and unpacks the properties into the registry event.OMRSRegistryEvent
(OMRSRegistryEventErrorCode errorCode, String errorMessage, String targetMetadataCollectionId, Connection remoteConnection) Constructor for the REGISTRATION_ERROR_EVENT outbound event.OMRSRegistryEvent
(OMRSRegistryEventType registryEventType) Constructor for an UnRegistration Event.OMRSRegistryEvent
(OMRSRegistryEventType registryEventType, Date registrationTimestamp, String metadataCollectionName, Connection remoteConnection) Constructor for a normal outbound event. -
Method Summary
Modifier and TypeMethodDescriptionReturn the error code for the event.Return the display name for the repository's metadata collection.Returns an OMRSEvent populated with details from this RegistryEventReturn the date/time that the repository registered with the open metadata repository cohort.Return the specific registry event type.Return the remote connection used to create a connector used to call the repository across the network.toString()
Standard toString method.Methods inherited from class org.odpi.openmetadata.repositoryservices.events.OMRSEvent
getErrorMessage, getEventCategory, getEventDirection, getEventOriginator, getEventTimestamp, getGenericErrorCode, getOtherAttributeTypeDef, getOtherInstanceGUID, getOtherMetadataCollectionId, getOtherOrigin, getOtherTypeDef, getOtherTypeDefSummary, getTargetAttributeTypeDef, getTargetInstanceGUID, getTargetMetadataCollectionId, getTargetRemoteConnection, getTargetTypeDefSummary, setEventOriginator
-
Constructor Details
-
OMRSRegistryEvent
Inbound event constructor that takes the object created by the Jackson JSON mapper and unpacks the properties into the registry event.- Parameters:
inboundEvent
- incoming Event.
-
OMRSRegistryEvent
public OMRSRegistryEvent(OMRSRegistryEventType registryEventType, Date registrationTimestamp, String metadataCollectionName, Connection remoteConnection) Constructor for a normal outbound event. It sets the event type and the other parameters used in a registry event payload.- Parameters:
registryEventType
- type of event (REGISTRATION_EVENT, REFRESH_REGISTRATION_REQUEST, RE_REGISTRATION_EVENT)registrationTimestamp
- time that the local repository registered.metadataCollectionName
- name of the metadata collection being registered.remoteConnection
- remote connection to this local repository.
-
OMRSRegistryEvent
Constructor for an UnRegistration Event.- Parameters:
registryEventType
- the type of event
-
OMRSRegistryEvent
public OMRSRegistryEvent(OMRSRegistryEventErrorCode errorCode, String errorMessage, String targetMetadataCollectionId, Connection remoteConnection) Constructor for the REGISTRATION_ERROR_EVENT outbound event.- Parameters:
errorCode
- detailed error codeerrorMessage
- Optional error messagetargetMetadataCollectionId
- the identifier of the server that sent bad information.remoteConnection
- remote connection to the target repository. (Optional only supplied if relevant to the reported error; otherwise null.)
-
-
Method Details
-
getRegistryEventType
Return the specific registry event type.- Returns:
- registry event type enum
-
getRegistrationTimestamp
Return the date/time that the repository registered with the open metadata repository cohort. If this is a normal registry event then this timestamp is the registration time for the local repository. If this an error event, then this is the registration time for the target repository.- Returns:
- Date object for timestamp
-
getMetadataCollectionName
Return the display name for the repository's metadata collection.- Returns:
- string name
-
getRemoteConnection
Return the remote connection used to create a connector used to call the repository across the network. If this is a normal registry event then this connection is for the local repository. If this an error event, then this is the connection for the target repository.- Returns:
- Connection object
-
getErrorCode
Return the error code for the event. This property is only used for error events.- Returns:
- OMRSRegistryEventErrorCode enum
-
getOMRSEventV1
Returns an OMRSEvent populated with details from this RegistryEvent- Overrides:
getOMRSEventV1
in classOMRSEvent
- Returns:
- OMRSEvent (Version 1) object
-
toString
Standard toString method.
-