Interface AdapterSelector<O,I,CO,CI>
-
- Type Parameters:
O- the output type from the underlying machine/platformI- the input type to the underlying machine/platformCO- the output type of the connectorCI- the input type of the connector
- All Known Subinterfaces:
ChannelAdapterSelector<O,I,CO,CI>
public interface AdapterSelector<O,I,CO,CI>Selects a protocol adapter based on the given machine data.- Author:
- Holger Eichelberger, SSE
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceAdapterSelector.AdapterProvider<O,I,CO,CI>Provides access to adapter data.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_CHANNELThe name of the default channel, in particular for an information-model non-multi-channel connector.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidinit(AdapterSelector.AdapterProvider<O,I,CO,CI> provider)Initializes the adapter selector.ProtocolAdapter<O,I,CO,CI>selectNorthInput(CI data)Returns the responsible protocol adapter for northbound input.ProtocolAdapter<O,I,CO,CI>selectSouthOutput(java.lang.String channel, O data)Returns the responsible protocol adapter for southbound output.
-
-
-
Field Detail
-
DEFAULT_CHANNEL
static final java.lang.String DEFAULT_CHANNEL
The name of the default channel, in particular for an information-model non-multi-channel connector. If there are multiple channels, this may map into the first registered adapter.- See Also:
- Constant Field Values
-
-
Method Detail
-
selectSouthOutput
ProtocolAdapter<O,I,CO,CI> selectSouthOutput(java.lang.String channel, O data)
Returns the responsible protocol adapter for southbound output.- Parameters:
channel- the channeldatawas received from, may beDEFAULT_CHANNELdata- the data object- Returns:
- the protocol adapter (must not be null)
-
selectNorthInput
ProtocolAdapter<O,I,CO,CI> selectNorthInput(CI data)
Returns the responsible protocol adapter for northbound input. So far, the channel is implicit.- Parameters:
data- the data object- Returns:
- the protocol adapter (must not be null)
-
init
void init(AdapterSelector.AdapterProvider<O,I,CO,CI> provider)
Initializes the adapter selector.- Parameters:
provider- the adapter information provider
-
-