Class ConnectorBroker
java.lang.Object
org.odpi.openmetadata.frameworks.connectors.ConnectorBroker
The ConnectorBroker is a generic factory for Open Connector Framework (OCF) Connectors.
The OCF provides a default implementation because all the implementation that is specific to a
particular type of connector is delegated to the connector provider specified in the connection.
-
Constructor Summary
ConstructorDescriptionTypical constructorConnectorBroker
(AuditLog auditLog) Constructor to supply the audit log to all connectors that implement the AuditLoggingConnector interface. -
Method Summary
Modifier and TypeMethodDescriptiongetConnector
(Connection connection) Creates a new instance of a connector using the name of the connector provider in the supplied connection.getConnector
(ConnectionProperties connection) Creates a new instance of a connector using the name of the connector provider in the supplied connection.toString()
Standard toString method.void
validateConnection
(Connection connection) Validate that the connection has sufficient properties to attempt to create a connector.void
validateConnection
(ConnectionProperties connection) Validate that the connection has sufficient properties to attempt to create a connector.
-
Constructor Details
-
ConnectorBroker
public ConnectorBroker()Typical constructor -
ConnectorBroker
Constructor to supply the audit log to all connectors that implement the AuditLoggingConnector interface.- Parameters:
auditLog
- audit log to pass on to the connector providers
-
-
Method Details
-
validateConnection
Validate that the connection has sufficient properties to attempt to create a connector. Any problems found are expressed as a ConnectionCheckedException.- Parameters:
connection
- connection properties- Throws:
ConnectionCheckedException
- an error with the connection.
-
validateConnection
Validate that the connection has sufficient properties to attempt to create a connector. Any problems found are expressed as a ConnectionCheckedException.- Parameters:
connection
- connection properties- Throws:
ConnectionCheckedException
- an error with the connection.
-
getConnector
public Connector getConnector(Connection connection) throws ConnectionCheckedException, ConnectorCheckedException Creates a new instance of a connector using the name of the connector provider in the supplied connection.- Parameters:
connection
- properties for the connector and connector provider.- Returns:
- new connector instance.
- Throws:
ConnectionCheckedException
- an error with the connection.ConnectorCheckedException
- an error initializing the connector.
-
getConnector
public Connector getConnector(ConnectionProperties connection) throws ConnectionCheckedException, ConnectorCheckedException Creates a new instance of a connector using the name of the connector provider in the supplied connection.- Parameters:
connection
- properties for the connector and connector provider.- Returns:
- new connector instance.
- Throws:
ConnectionCheckedException
- an error with the connection.ConnectorCheckedException
- an error initializing the connector.
-
toString
Standard toString method.
-