Class GenericMultiTypeServiceImpl
java.lang.Object
de.iip_ecosphere.platform.services.environment.GenericMultiTypeServiceImpl
Basic implementation classes for
GenericMultiTypeService. Intended use is by delegation.- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents an input or output type.static classRepresents an input type.static classRepresents an output type. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Map<String, GenericMultiTypeServiceImpl.InTypeInfo<?>> private Map<String, GenericMultiTypeServiceImpl.OutTypeInfo<?>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<O> voidattachIngestor(Class<O> outCls, String outTypeName, DataIngestor<O> ingestor) Attaches an asynchronous result data ingestor.getInTypeInfo(String inTypeName) Returns the input type information object for the given symbolic type name.getOutTypeInfo(String outTypeName) Returns the output type information object for the given symbolic type name.getOutTypeName(String inTypeName) Returns a registered output type name for a given input type name.obtainInTypeInfo(Class<I> cls, String typeName) Obtains an input type information object.obtainOutTypeInfo(Class<O> cls, String typeName) Obtains an output type information object.voidregisterInOutRelation(String inTypeName, String outTypeName) Explicitly registers the relation between two type names.<I> voidregisterInputTypeTranslator(Class<I> inCls, String inTypeName, de.iip_ecosphere.platform.transport.serialization.TypeTranslator<I, String> inTrans) Adds an input type translator.<O> voidregisterOutputTypeTranslator(Class<O> outCls, String outTypeName, de.iip_ecosphere.platform.transport.serialization.TypeTranslator<String, O> outTrans) Adds an output type translator.
-
Field Details
-
outTypeInfos
-
inTypeInfos
-
inOutTypeRelations
-
-
Constructor Details
-
GenericMultiTypeServiceImpl
public GenericMultiTypeServiceImpl()
-
-
Method Details
-
obtainOutTypeInfo
public <O> GenericMultiTypeServiceImpl.OutTypeInfo<O> obtainOutTypeInfo(Class<O> cls, String typeName) Obtains an output type information object.- Type Parameters:
O- the output type- Parameters:
cls- the class representing the typetypeName- the associated symbolic type name- Returns:
- the output type information object, may be retrieved or new
-
obtainInTypeInfo
public <I> GenericMultiTypeServiceImpl.InTypeInfo<I> obtainInTypeInfo(Class<I> cls, String typeName) Obtains an input type information object.- Type Parameters:
I- the input type- Parameters:
cls- the class representing the typetypeName- the associated symbolic type name- Returns:
- the input type information object, may be retrieved or new
-
getInTypeInfo
Returns the input type information object for the given symbolic type name.- Parameters:
inTypeName- the symbolic type name- Returns:
- the information object or null if none was registered
-
getOutTypeInfo
Returns the output type information object for the given symbolic type name.- Parameters:
outTypeName- the symbolic type name- Returns:
- the information object or null if none was registered
-
registerInputTypeTranslator
public <I> void registerInputTypeTranslator(Class<I> inCls, String inTypeName, de.iip_ecosphere.platform.transport.serialization.TypeTranslator<I, String> inTrans) Adds an input type translator.- Type Parameters:
I- the input data type- Parameters:
inCls- the class representing the input typeinTypeName- symbolic name ofinCls, e.g. from configuration modelinTrans- the input data type translator- See Also:
-
registerInOutRelation
Explicitly registers the relation between two type names.- Parameters:
inTypeName- symbolic name of an input type, e.g. from configuration modeloutTypeName- symbolic name of an output type, e.g. from configuration model- See Also:
-
getOutTypeName
Returns a registered output type name for a given input type name.- Parameters:
inTypeName- the symbolic input type name- Returns:
- the related symbolic output type name, may be null if there is none
- See Also:
-
attachIngestor
Attaches an asynchronous result data ingestor.- Type Parameters:
O- the output data type- Parameters:
outCls- the class representing the typeoutTypeName- symbolic name ofoutCls, e.g. from configuration modelingestor- the ingestor instance
-
registerOutputTypeTranslator
public <O> void registerOutputTypeTranslator(Class<O> outCls, String outTypeName, de.iip_ecosphere.platform.transport.serialization.TypeTranslator<String, O> outTrans) Adds an output type translator.- Type Parameters:
O- the output data type- Parameters:
outCls- the class representing the input typeoutTypeName- symbolic name ofoutCls, e.g. from configuration modeloutTrans- the output data type translator- See Also:
-