Class DefaultConnectorFactoryDescriptor.SinglePathAdapterSupplier<O,I,CO,CI>
java.lang.Object
de.iip_ecosphere.platform.connectors.DefaultConnectorFactoryDescriptor.ProtocolAdapterSupplier<O,I,CO,CI>
de.iip_ecosphere.platform.connectors.DefaultConnectorFactoryDescriptor.SinglePathAdapterSupplier<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
- Enclosing class:
DefaultConnectorFactoryDescriptor
protected static class DefaultConnectorFactoryDescriptor.SinglePathAdapterSupplier<O,I,CO,CI>
extends DefaultConnectorFactoryDescriptor.ProtocolAdapterSupplier<O,I,CO,CI>
Type-safe protocol adapter supplier for multiple adapters. Doesn't work without as Java does not allow casting
from/to a supplier with inner wildcard type parameters.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from class de.iip_ecosphere.platform.connectors.DefaultConnectorFactoryDescriptor.ProtocolAdapterSupplier
ciClass, coClass, iClass, oClass -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSinglePathAdapterSupplier(DefaultConnectorFactoryDescriptor.PathSupplier<ProtocolAdapter<O, I, CO, CI>> protoSupplier, Class<O> oClass, Class<I> iClass, Class<CO> coClass, Class<CI> ciClass) Creates a supplier with type instances. -
Method Summary
Modifier and TypeMethodDescription<OT,IT, COT, CIT>
ProtocolAdapter<OT,IT, COT, CIT>[] get(de.iip_ecosphere.platform.support.metrics.MetricsProvider metrics, File log, Supplier<String> inPathSupplier, Supplier<String> outPathSupplier, Class<OT> oClass, Class<IT> iClass, Class<COT> coClass, Class<CIT> ciClass) Returns an instance if apparently type-compatible.
-
Field Details
-
protoSupplier
-
-
Constructor Details
-
SinglePathAdapterSupplier
protected SinglePathAdapterSupplier(DefaultConnectorFactoryDescriptor.PathSupplier<ProtocolAdapter<O, I, CO, CI>> protoSupplier, Class<O> oClass, Class<I> iClass, Class<CO> coClass, Class<CI> ciClass) Creates a supplier with type instances.- Parameters:
protoSupplier- the supplieroClass- the type forOiClass- the type forIcoClass- the type forCOciClass- the type forCI
-
-
Method Details
-
get
public <OT,IT, ProtocolAdapter<OT,COT, CIT> IT, getCOT, CIT>[] (de.iip_ecosphere.platform.support.metrics.MetricsProvider metrics, File log, Supplier<String> inPathSupplier, Supplier<String> outPathSupplier, Class<OT> oClass, Class<IT> iClass, Class<COT> coClass, Class<CIT> ciClass) Description copied from class:DefaultConnectorFactoryDescriptor.ProtocolAdapterSupplierReturns an instance if apparently type-compatible.- Specified by:
getin classDefaultConnectorFactoryDescriptor.ProtocolAdapterSupplier<O,I, CO, CI> - Type Parameters:
OT- the desired output type from the underlying machine/platformIT- the desired input type to the underlying machine/platformCOT- the desired output type of the connectorCIT- the desired input type of the connector- Parameters:
metrics- the metrics provider to use, null for no metric measurementslog- the log file to use to record individual measurements in experiments, null for no logging. Only becomes active ifmetricsis not nullinPathSupplier- function returning the actual input base path to use for data accesses, may be nulloutPathSupplier- function returning the actual output base path to use for data accesses, may be nulloClass- the type forOTiClass- the type forITcoClass- the type forCOTciClass- the type forCIT- Returns:
- the instance or null if it is not possible to create/cast an instance
-