Interface ConnectorFactory

  • All Known Implementing Classes:
    ConnectorFactoryImpl

    public interface ConnectorFactory
    This is the service interface implementations need to register. An instance of ConnectorFactory is able to create a new connector with given configuration values - dependant on the implementation - that is bound to a specific saperion backend.
    Author:
    jschwarz
    • Method Detail

      • newConnector

        Connector newConnector​(java.util.Map<java.lang.String,​java.lang.String> properties)
        This method creates a new connector configured by the given configuration properties.
        Parameters:
        properties - the configuration properties.
        Returns:
        a new connector configured by the given configuration properties
      • newConnector

        default Connector newConnector()
        This method creates a new connector configured by with default configuration properties.
        Returns:
        a new connector configured with default configuration properties
      • newConnector

        default Connector newConnector​(java.util.Properties properties)
        This method creates a new connector configured by the given configuration properties.
        Parameters:
        properties - the configuration properties.
        Returns:
        a new connector configured by the given configuration properties
      • loadConnectorFactory

        static ConnectorFactory loadConnectorFactory()
        This method is a convenience method to retrieve an implementation of this service interface using the java service loader. It will warn when there are several implementations present and chose a arbitrary one.
        Returns:
        an implementation of this service interface
        Throws:
        java.lang.IllegalStateException - when no implementation of the service interface is present in the classpath