public abstract class ConnectorFactory
extends java.lang.Object
It is used by IBM Integration Bus to call the connector provider to change its state and request for particular types of connectors to be created. To install the connector factory in an integration node a ConnectorProviders configurable service must be created that references this class.
The ConnectorFactory is constructed when an integration server is started. The following methods are called by the integration node to interact with the connector factory:
initialize
is called with details of the connector factory's name and properties provided on the configurable service when the integration server starts.start
is called when the first node that uses the connector is deployed.stop
is called when the last node using the connector is removed from the integration server.
Terminate
is called when the integration server is about stop.
The connection factory is also called to create connectors when nodes are deployed that need to interact with the end system.
createOutputConnector
is called when the integration node wants to send data to the end system with out receiving any response data. Override this method to create
an OutputConnector that can interact with the end system. Leave it unimplemented if you do not which to support this interaction pattern.
createRequestConnector
is called when the integration node wants to make request call to the end system and receive response data. Override this method to create
an RequestConnector that can interact with the end system. Leave it unimplemented if you do not which to support this interaction pattern.
createInputConnector
is called when the integration node wants to receive data from an end system. Override this method to create
an InputConnector that can interact with the end system. Leave it unimplemented if you do not which to support this interaction pattern.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
copyright |
Modifier and Type | Method and Description |
---|---|
EventInputConnector |
createEventInputConnector(java.lang.String name,
java.util.Properties sessionProps)
Deprecated.
use
#createInputConnector() instead |
InputConnector |
createInputConnector(java.lang.String name,
java.util.Properties sessionProps)
Deprecated.
|
InputConnector |
createInputConnector(java.lang.String name,
java.util.Properties sessionProps,
SecurityIdentity securityIdentity)
This is called by the integration node when a connector to receive data from the system is required.
|
OutputConnector |
createOutputConnector(java.lang.String name,
java.util.Properties properties)
Deprecated.
|
OutputConnector |
createOutputConnector(java.lang.String name,
java.util.Properties properties,
SecurityIdentity security)
This is called by the integration node when a connector to send data to the system is required.
|
RequestConnector |
createRequestConnector(java.lang.String name,
java.util.Properties properties)
This is called by the integration node when a connector to send data to the system is required.
|
java.lang.String |
getCatalogName() |
java.lang.String[] |
getConnectorStatNames()
Gets the names of the stats used by a connector
|
ContainerServices |
getContainerServices()
Returns a ContainerServices object which can be used by a connector writer to
obtain function and resources provided by the environment running the connector.
|
EventInputConnector[] |
getEventInputConnectors()
Returns an array of all EventInputConnectors which have been created by this factory and have not been terminated.
|
abstract java.lang.String |
getInfo()
This is called by the integration node to get a information about the ConnectorFactory.
|
java.lang.String |
getName()
Returns a provider name.
|
OutputConnector[] |
getOutputConnectors()
Returns an array of all OutputConnectors which have been created by this factory and have not been terminated.
|
PollingInputConnector[] |
getPollingInputConnectors()
Returns an array of all NBPollingInputConnectors which have been created by this factory and have not been terminated.
|
java.util.Properties |
getProperties()
Returns a properties for this connector factory.
|
RequestConnector[] |
getRequestConnectors()
Returns an array of all RequestConnectors which have been created by this factory and have not been terminated.
|
void |
initialize(java.lang.String name,
java.util.Properties properties)
This is called by the integration node when an integration server is started up.
|
void |
start()
This is called by the integration node when the first usage of the provider is about to happen.
|
void |
stop()
This is called by the integration node when the last connector using the provider is destroyed.
|
void |
terminate()
This is called by the integration node when the integration server is about to stop.
|
void |
writeActivityLog(java.lang.String messageNumber,
java.lang.String[] inserts)
Writes an entry to activity log using the context that this connector is being run in.
|
void |
writeActivityLog(java.lang.String messageNumber,
java.lang.String[] inserts,
java.util.Properties extraTags)
Writes an entry to activity log using the context that this connector is being run in.
|
public static final java.lang.String copyright
public abstract java.lang.String getInfo() throws com.ibm.broker.plugin.MbException
com.ibm.broker.plugin.MbException
- Throwing an exception will cause empty data to be used for the connector info.public void initialize(java.lang.String name, java.util.Properties properties) throws com.ibm.broker.plugin.MbException
name
- name of the connector factory as defined in the ConnectorProviders configurable serviceproperties
- the properties defined on the ConnectorProviders configurable servicecom.ibm.broker.plugin.MbException
- Throwing an exception will stop the ConnectionFactory being available for use.public void start() throws com.ibm.broker.plugin.MbException
com.ibm.broker.plugin.MbException
- Throwing an exception will fail the creation of the flow causing the start request.public RequestConnector createRequestConnector(java.lang.String name, java.util.Properties properties) throws com.ibm.broker.plugin.MbException
name
- name of the connector based on the flow and node being usedproperties
- the properties defined on the node creating the connectorcom.ibm.broker.plugin.MbException
- Throwing an exception will fail the creation of the flow requesting the connector.public OutputConnector createOutputConnector(java.lang.String name, java.util.Properties properties, SecurityIdentity security) throws com.ibm.broker.plugin.MbException
name
- name of the connector based on the flow and node being usedproperties
- the properties defined on the node creating the connectorcom.ibm.broker.plugin.MbException
- Throwing an exception will fail the creation of the flow requesting the connector.@Deprecated public OutputConnector createOutputConnector(java.lang.String name, java.util.Properties properties) throws com.ibm.broker.plugin.MbException
com.ibm.broker.plugin.MbException
public InputConnector createInputConnector(java.lang.String name, java.util.Properties sessionProps, SecurityIdentity securityIdentity) throws com.ibm.broker.plugin.MbException
name
- name of the connector based on the flow and node being usedsessionProps
- the properties defined on the node creating the connectorwhen
- required to authenticate with the endpoint, this parameter is used to retrieve credentials that have been confiugred for this instance of the connectorcom.ibm.broker.plugin.MbException
- Throwing an exception will fail the creation of the flow requesting the connector.@Deprecated public InputConnector createInputConnector(java.lang.String name, java.util.Properties sessionProps) throws com.ibm.broker.plugin.MbException
com.ibm.broker.plugin.MbException
@Deprecated public EventInputConnector createEventInputConnector(java.lang.String name, java.util.Properties sessionProps) throws com.ibm.broker.plugin.MbException
#createInputConnector()
insteadname
- name of the connector based on the flow and node being usedsessionProps
- the properties defined on the node creating the connectorcom.ibm.broker.plugin.MbException
- Throwing an exception will fail the creation of the flow requesting the connector.public void stop() throws com.ibm.broker.plugin.MbException
com.ibm.broker.plugin.MbException
- Throwing an exception will not prevent any flows being stopped.public void terminate() throws com.ibm.broker.plugin.MbException
com.ibm.broker.plugin.MbException
- Throwing an exception will not prevent any flows being stopped.public java.lang.String getCatalogName()
com.ibm.broker.plugin.MbException
public final ContainerServices getContainerServices()
com.ibm.broker.plugin.MbException
public final java.lang.String getName() throws com.ibm.broker.plugin.MbException
com.ibm.broker.plugin.MbException
public final java.util.Properties getProperties() throws com.ibm.broker.plugin.MbException
com.ibm.broker.plugin.MbException
public final RequestConnector[] getRequestConnectors() throws com.ibm.broker.plugin.MbException
com.ibm.broker.plugin.MbException
public final OutputConnector[] getOutputConnectors() throws com.ibm.broker.plugin.MbException
com.ibm.broker.plugin.MbException
public final EventInputConnector[] getEventInputConnectors() throws com.ibm.broker.plugin.MbException
com.ibm.broker.plugin.MbException
public final PollingInputConnector[] getPollingInputConnectors() throws com.ibm.broker.plugin.MbException
com.ibm.broker.plugin.MbException
public final void writeActivityLog(java.lang.String messageNumber, java.lang.String[] inserts) throws com.ibm.broker.plugin.MbException
messageNumber
- message number for the catalog to use.inserts
- the inserts to include in the messagecom.ibm.broker.plugin.MbException
public final void writeActivityLog(java.lang.String messageNumber, java.lang.String[] inserts, java.util.Properties extraTags) throws com.ibm.broker.plugin.MbException
messageNumber
- message number for the catalog to use.inserts
- the inserts to include in the messageextraTags
- a map of tags to values which will be used to tag this log message.com.ibm.broker.plugin.MbException
public java.lang.String[] getConnectorStatNames()