Class GenericMultiTypeServiceImpl.OutTypeInfo<T>

java.lang.Object
de.iip_ecosphere.platform.services.environment.GenericMultiTypeServiceImpl.AbstractTypeInfo<T>
de.iip_ecosphere.platform.services.environment.GenericMultiTypeServiceImpl.OutTypeInfo<T>
Type Parameters:
T - the Java representation of the output type
Enclosing class:
GenericMultiTypeServiceImpl

public static class GenericMultiTypeServiceImpl.OutTypeInfo<T> extends GenericMultiTypeServiceImpl.AbstractTypeInfo<T>
Represents an output type.
Author:
Holger Eichelberger, SSE
  • Field Details

    • outTranslator

      private de.iip_ecosphere.platform.transport.serialization.TypeTranslator<String,T> outTranslator
    • ingestor

      private DataIngestor<T> ingestor
  • Constructor Details

    • OutTypeInfo

      protected OutTypeInfo(Class<T> type)
      Creates an instance.
      Parameters:
      type - the class representing the data type
  • Method Details

    • getOutTranslator

      public de.iip_ecosphere.platform.transport.serialization.TypeTranslator<String,T> getOutTranslator()
      Returns the output translator.
      Returns:
      the type translator, may be null
    • getIngestor

      protected DataIngestor<T> getIngestor()
      Returns the associated ingestor.
      Returns:
      the ingestor (may be null)
    • validateAndGetIngestor

      public DataIngestor<T> validateAndGetIngestor(String typeName)
      Validates the associated ingestor and returns it. If no ingestor is associated, an ingestor for synchronous processing (AbstractPythonProcessService.SyncDataIngestor) will be created and associated.
      Parameters:
      typeName - the data type name as specified in the configuration model
      Returns:
      the ingestor
    • validateAndIngest

      protected void validateAndIngest(String typeName, String data) throws IOException
      Validates the associated ingestor and ingests the given data. If no ingestor is associated, an ingestor for synchronous processing (AbstractPythonProcessService.SyncDataIngestor) will be created and associated.
      Parameters:
      typeName - the data type name as specified in the configuration model
      data - to be ingested
      Throws:
      IOException - if data ingestion failed