Class ConnectorProvider

java.lang.Object
org.odpi.openmetadata.frameworks.connectors.ConnectorProvider
Direct Known Subclasses:
ConnectorProviderBase, LocalOMRSConnectorProvider

public abstract class ConnectorProvider extends Object
The ConnectorProvider is a formal plug-in interface for the Open Connector Framework (OCF). It provides a factory class for a specific type of connector. Therefore is it typical to find the ConnectorProvider and Connector implementation written as a pair. The ConnectorProvider uses the properties stored in a Connection object to initialize itself and its Connector instances. the Connection object has the endpoint properties for the server that the connector must communicate with as well as optional additional properties that may be needed for a particular type of connector. It is suggested that the ConnectorProvider validates the contents of the connection and throws ConnectionErrorExceptions if the connection has missing or invalid properties. If there are errors detected in the instantiations or initialization of the connector, then these should be thrown as ConnectorErrorExceptions.
  • Constructor Details

    • ConnectorProvider

      public ConnectorProvider()
  • Method Details

    • getConnectorTypeProperties

      public abstract ConnectorTypeProperties getConnectorTypeProperties()
      Returns the properties about the type of connector that this ConnectorTypeManager supports.
      Returns:
      properties including the name of the connector type, the connector provider class and any specific connection properties that are recognized by this connector.
    • getConnectorType

      public abstract ConnectorType getConnectorType()
      Returns the properties about the type of connector that this ConnectorTypeManager supports.
      Returns:
      properties including the name of the connector type, the connector provider class and any specific connection properties that are recognized by this connector.
    • getConnector

      public abstract Connector getConnector(Connection connection) throws ConnectionCheckedException, ConnectorCheckedException
      Creates a new instance of a connector using the information from the connection and the properties from the subclass(es).
      Parameters:
      connection - connection that should have all the properties needed by the Connector Provider to create a connector instance.
      Returns:
      new connector instance.
      Throws:
      ConnectionCheckedException - an error with the connection.
      ConnectorCheckedException - an error initializing the connector.
    • getConnector

      public abstract Connector getConnector(ConnectionProperties connection) throws ConnectionCheckedException, ConnectorCheckedException
      Creates a new instance of a connector using the information from the connection and the properties from the subclass(es).
      Parameters:
      connection - connection that should have all the properties needed by the Connector Provider to create a connector instance.
      Returns:
      Connector instance of the connector.
      Throws:
      ConnectionCheckedException - if there are missing or invalid properties in the connection
      ConnectorCheckedException - if there are issues instantiating or initializing the connector