Interface ConnectorDescriptor
- All Known Implementing Classes:
AbstractPluginChannelConnectorDescriptor,AbstractPluginConnectorDescriptor
public interface ConnectorDescriptor
Describes a connector without instantiating it. Required to use the Java services mechanism to
silently register connector classes with the
ConnectorRegistry. Per connector type
(getConnectorType()) there shall be only a single descriptor (instance)!-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault <O,I, CO, CI, A extends ProtocolAdapter<O, I, CO, CI>>
Connector<O, I, CO, CI> createConnector(Supplier<ConnectorParameter> params, A... adapter) Creates a connector instance.<O,I, CO, CI, S extends AdapterSelector<O, I, CO, CI>, A extends ProtocolAdapter<O, I, CO, CI>>
Connector<O, I, CO, CI> createConnector(S selector, Supplier<ConnectorParameter> params, A... adapter) Creates a connector instance.Class<?> Returns the type of the connector.getName()Returns the name of the connector.
-
Field Details
-
PLUGIN_ID_PREFIX
- See Also:
-
PLUGIN_TEST_ID_PREFIX
- See Also:
-
-
Method Details
-
getName
String getName()Returns the name of the connector.- Returns:
- the name
-
getConnectorType
Class<?> getConnectorType()Returns the type of the connector.- Returns:
- the type
-
createConnector
default <O,I, Connector<O,CO, CI, A extends ProtocolAdapter<O, I, CO, CI>> I, createConnectorCO, CI> (Supplier<ConnectorParameter> params, A... adapter) Creates a connector instance.- Type Parameters:
O- the output type from the underlying machine/platform/external sinksourceI- the input type to the underlying machine/platform/external sinksourceCO- the output type of the connectorCI- the input type of the connectorA- the protocol adapter type- Parameters:
params- the connector parameters supplieradapter- the protocol adapters to create the connector for- Returns:
- the created connector
-
createConnector
<O,I, Connector<O,CO, CI, S extends AdapterSelector<O, I, CO, CI>, A extends ProtocolAdapter<O, I, CO, CI>> I, createConnectorCO, CI> (S selector, Supplier<ConnectorParameter> params, A... adapter) Creates a connector instance.- Type Parameters:
O- the output type from the underlying machine/platform/external sinksourceI- the input type to the underlying machine/platform/external sinksourceCO- the output type of the connectorCI- the input type of the connectorS- the protocol selector typeA- the protocol adapter type- Parameters:
selector- the protocol selector, may be null for noneparams- the connector parameters supplieradapter- the protocol adapters to create the connector for- Returns:
- the created connector
-