Class ConnectorInputTypeAdapter<S>
java.lang.Object
de.iip_ecosphere.platform.connectors.types.ConnectorInputTypeAdapter<S>
- Type Parameters:
S- the source type (seeInputTypeTranslator)
- All Implemented Interfaces:
ModelAccessProvider,ConnectorInputTypeTranslator<S,,byte[]> de.iip_ecosphere.platform.transport.serialization.InputTypeTranslator<S,byte[]>
public class ConnectorInputTypeAdapter<S>
extends Object
implements ConnectorInputTypeTranslator<S,byte[]>
Adapts a basic input translator/serializer for reuse.
- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.iip_ecosphere.platform.connectors.model.ModelAccessProvider
ModelAccessProvider.IOModelAccessFunction, ModelAccessProvider.IOVoidFunction -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ModelAccessprivate de.iip_ecosphere.platform.transport.serialization.Serializer<S> -
Constructor Summary
ConstructorsConstructorDescriptionConnectorInputTypeAdapter(de.iip_ecosphere.platform.transport.serialization.Serializer<S> serializer) Creates an instance. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Returns the model access instance to be used during type translations.Class<? extends byte[]> Returns the source type.Returns the target type.voidsetModelAccess(ModelAccess modelAccess) Defines the model access.
-
Field Details
-
serializer
-
modelAccess
-
-
Constructor Details
-
ConnectorInputTypeAdapter
public ConnectorInputTypeAdapter(de.iip_ecosphere.platform.transport.serialization.Serializer<S> serializer) Creates an instance.- Parameters:
serializer- the serializer to adapt
-
-
Method Details
-
from
- Specified by:
fromin interfacede.iip_ecosphere.platform.transport.serialization.InputTypeTranslator<S,byte[]> - Throws:
IOException
-
getModelAccess
Description copied from interface:ModelAccessProviderReturns the model access instance to be used during type translations.- Specified by:
getModelAccessin interfaceModelAccessProvider- Returns:
- the model access instance, may be null (see
MachineConnector.hasModel())
-
setModelAccess
Description copied from interface:ModelAccessProviderDefines the model access. Handle with care, shall be called (indirectly) by the connector only.- Specified by:
setModelAccessin interfaceModelAccessProvider- Parameters:
modelAccess- the model access
-
getSourceType
Description copied from interface:ConnectorInputTypeTranslatorReturns the source type.- Specified by:
getSourceTypein interfaceConnectorInputTypeTranslator<S,byte[]> - Returns:
- the source type
-
getTargetType
Description copied from interface:ConnectorInputTypeTranslatorReturns the target type.- Specified by:
getTargetTypein interfaceConnectorInputTypeTranslator<S,byte[]> - Returns:
- the target type
-