Connector types
OpenICF supports multiple connector types based on the implementation of the connector
interface and the configuration
interface. These two interfaces determine whether the connector can be pooled and whether its configuration is stateful. Before you begin developing your connector, decide on the connector type based on the system to which you are connecting. Learn more about how the OpenICF framework manages each connector type in Connector instance management.
This section outlines the different connector types.
- Connector
-
The basic connector is a non-poolable connector. Each operation is executed on a new instance of the connector. OpenICF creates a new instance of the connector class and uses a new or existing instance of the connector configuration to initialize the instance before the operation is started. After the operation completes, OpenICF disposes of the connector instance.
- Poolable Connector
-
Before an operation is started, an existing connector instance is pulled from the connector pool. If there’s no existing instance, a new instance is created. After the operation runs, the connector instance is released and placed back into the pool.
The OpenICF framework pools instances of a poolable connector, rather than pooling connections within the connector. Learn more about pooling in Connection pooling configuration.
- Configuration
-
For a basic non-stateful configuration, a new configuration instance is created and configured with the configuration properties each time the configuration is used when an operation is validated or when a new connector instance is initialized.
- Stateful Configuration
-
With a stateful configuration, the configuration instance is created only once and is used until the facade or connector pool associated with the configuration is disposed of.
The following table illustrates how these elements combine to determine the connector type.
Connector | Poolable Connector | |
---|---|---|
Configuration |
Entirely stateless combination. A new configuration and connector instance are created for each operation. |
It’s preferable to keep connector instances in a pool. A new configuration is required only when a new connector instance is added to the pool. |
Stateful Configuration |
The configuration can be used to make the heavy resource initialization. The less intensive connector instance can then run the operation. |
The configuration must be shared between the instances in the same pool and the connector initialization is expensive. |
Learn how the OpenICF framework manages each connector type in Connector instance management.