Package com.lexmark.saperion.client.spi
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 Summary
Modifier and TypeMethodDescriptionstatic ConnectorFactory
This method is a convenience method to retrieve an implementation of this service interface using the java service loader.default Connector
This method creates a new connector configured by with default configuration properties.newConnector
(Map<String, String> properties) This method creates a new connector configured by the given configuration properties.default Connector
newConnector
(Properties properties) This method creates a new connector configured by the given configuration properties.
-
Method Details
-
newConnector
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
This method creates a new connector configured by with default configuration properties.- Returns:
- a new connector configured with default configuration properties
-
newConnector
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
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:
IllegalStateException
- when no implementation of the service interface is present in the classpath
-