public class OMRSTopicConnector extends ConnectorBase implements OMRSTopic, VirtualConnectorExtension, OpenMetadataTopicListener, AuditableConnector
The OMRSTopicConnector is a virtual connector. It uses one or more event bus connectors to interact with real event buses. These connectors are passed to it during initialization. During its operation, it acts as a go-between the event buses processing JSON payloads and internal open metadata components that expect to receive OMRS Events.
OMRSTopicConnector implements 3 interfaces:
ConnectorBase.ProtectedConnection| Modifier and Type | Field and Description |
|---|---|
protected OMRSAuditLog |
auditLog |
connectedAssetProperties, connectionBean, connectionProperties, connectorInstanceId, isActive, securedProperties| Constructor and Description |
|---|
OMRSTopicConnector()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
disconnect()
Free up any resources held since the connector is no longer needed.
|
void |
initializeEmbeddedConnectors(List<Connector> embeddedConnectors)
Registers itself as a listener of any OpenMetadataTopicConnectors that are passed as
embedded connectors.
|
void |
processEvent(String event)
Receives events from the real topic, parses them into event objects and passes them on to
the OMRSTopicListeners registered with this connector.
|
void |
registerListener(OMRSTopicListener topicListener)
Deprecated.
|
void |
registerListener(OMRSTopicListener topicListener,
String serviceName)
Register a listener object.
|
void |
sendInstanceEvent(OMRSInstanceEvent instanceEvent)
Set the instance event to the OMRS Topic connector if the instance
event is of the permitted type.
|
void |
sendRegistryEvent(OMRSRegistryEvent registryEvent)
Send the registry event to the OMRS Topic connector and manage errors
|
void |
sendTypeDefEvent(OMRSTypeDefEvent typeDefEvent)
Send the TypeDef event to the OMRS Topic connector (providing TypeDef Events are enabled).
|
void |
setAuditLog(OMRSAuditLog auditLog)
Receive an audit log object that can be used to record audit log messages.
|
void |
setEventProtocolLevel(OMRSEventProtocolVersion eventProtocolVersion)
Setup the version of the protocol to use for events.
|
void |
start()
Indicates that the connector is completely configured and can begin processing.
|
equals, getConnectedAssetProperties, getConnection, getConnectorInstanceId, hashCode, initialize, initializeConnectedAssetProperties, isActive, toStringprotected OMRSAuditLog auditLog
public void initializeEmbeddedConnectors(List<Connector> embeddedConnectors)
initializeEmbeddedConnectors in interface VirtualConnectorExtensionembeddedConnectors - list of connectorspublic void setAuditLog(OMRSAuditLog auditLog)
setAuditLog in interface AuditableConnectorauditLog - audit log objectpublic void setEventProtocolLevel(OMRSEventProtocolVersion eventProtocolVersion)
setEventProtocolLevel in interface OMRSTopiceventProtocolVersion - version enum@Deprecated public void registerListener(OMRSTopicListener topicListener)
registerListener in interface OMRSTopictopicListener - object implementing the OMRSTopicListener interfacepublic void registerListener(OMRSTopicListener topicListener, String serviceName)
registerListener in interface OMRSTopictopicListener - object implementing the OMRSTopicListener interfaceserviceName - name os service that the listener is frompublic void start()
throws ConnectorCheckedException
start in class ConnectorBaseConnectorCheckedException - there is a problem within the connector.public void sendRegistryEvent(OMRSRegistryEvent registryEvent) throws ConnectorCheckedException
sendRegistryEvent in interface OMRSTopicregistryEvent - properties of the event to sendConnectorCheckedException - the connector is not able to communicate with the event buspublic void sendTypeDefEvent(OMRSTypeDefEvent typeDefEvent) throws ConnectorCheckedException
sendTypeDefEvent in interface OMRSTopictypeDefEvent - properties of the event to sendConnectorCheckedException - the connector is not able to communicate with the event buspublic void sendInstanceEvent(OMRSInstanceEvent instanceEvent) throws ConnectorCheckedException
sendInstanceEvent in interface OMRSTopicinstanceEvent - properties of the event to sendConnectorCheckedException - the connector is not able to communicate with the event buspublic void processEvent(String event)
processEvent in interface OpenMetadataTopicListenerevent - inbound eventpublic void disconnect()
throws ConnectorCheckedException
disconnect in class ConnectorBaseConnectorCheckedException - there is a problem within the connector.Copyright © 2018–2020 ODPi. All rights reserved.