Class GenericMultiTypeServiceImpl

java.lang.Object
de.iip_ecosphere.platform.services.environment.GenericMultiTypeServiceImpl

public class GenericMultiTypeServiceImpl extends Object
Basic implementation classes for GenericMultiTypeService. Intended use is by delegation.
Author:
Holger Eichelberger, SSE
  • Field Details

  • 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 type
      typeName - 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 type
      typeName - the associated symbolic type name
      Returns:
      the input type information object, may be retrieved or new
    • getInTypeInfo

      public GenericMultiTypeServiceImpl.InTypeInfo<?> getInTypeInfo(String inTypeName)
      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

      public GenericMultiTypeServiceImpl.OutTypeInfo<?> getOutTypeInfo(String outTypeName)
      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 type
      inTypeName - symbolic name of inCls, e.g. from configuration model
      inTrans - the input data type translator
      See Also:
    • registerInOutRelation

      public void registerInOutRelation(String inTypeName, String outTypeName)
      Explicitly registers the relation between two type names.
      Parameters:
      inTypeName - symbolic name of an input type, e.g. from configuration model
      outTypeName - symbolic name of an output type, e.g. from configuration model
      See Also:
    • getOutTypeName

      public String getOutTypeName(String inTypeName)
      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

      public <O> void attachIngestor(Class<O> outCls, String outTypeName, DataIngestor<O> ingestor)
      Attaches an asynchronous result data ingestor.
      Type Parameters:
      O - the output data type
      Parameters:
      outCls - the class representing the type
      outTypeName - symbolic name of outCls, e.g. from configuration model
      ingestor - 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 type
      outTypeName - symbolic name of outCls, e.g. from configuration model
      outTrans - the output data type translator
      See Also: