Class PythonProcessServiceTest.CountingAsyncPythonProcessService

java.lang.Object
de.iip_ecosphere.platform.services.environment.AbstractService
de.iip_ecosphere.platform.services.environment.AbstractRunnablesService
de.iip_ecosphere.platform.services.environment.AbstractPythonProcessService
de.iip_ecosphere.platform.services.environment.PythonAsyncProcessService
test.de.iip_ecosphere.platform.services.environment.PythonProcessServiceTest.CountingAsyncPythonProcessService
All Implemented Interfaces:
de.iip_ecosphere.platform.services.environment.GenericMultiTypeService, de.iip_ecosphere.platform.services.environment.ParameterConfigurerProvider, de.iip_ecosphere.platform.services.environment.Service, de.iip_ecosphere.platform.services.environment.switching.ServiceBase
Enclosing class:
PythonProcessServiceTest

private class PythonProcessServiceTest.CountingAsyncPythonProcessService extends de.iip_ecosphere.platform.services.environment.PythonAsyncProcessService
Extension of python async process service to count the number of processed items for asserting.
Author:
Holger Eichelberger, SSE
  • Nested Class Summary

    Nested classes/interfaces inherited from class de.iip_ecosphere.platform.services.environment.AbstractPythonProcessService

    de.iip_ecosphere.platform.services.environment.AbstractPythonProcessService.InputHandler, de.iip_ecosphere.platform.services.environment.AbstractPythonProcessService.SyncDataIngestor<D>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private int
     

    Fields inherited from class de.iip_ecosphere.platform.services.environment.AbstractPythonProcessService

    TYPE_SEPARATOR_CHAR

    Fields inherited from interface de.iip_ecosphere.platform.services.environment.switching.ServiceBase

    APPLICATION_SEPARATOR, DEFAULT_APPLICATION_INSTANCE_ID
  • Constructor Summary

    Constructors
    Constructor
    Description
    CountingAsyncPythonProcessService(de.iip_ecosphere.platform.services.environment.YamlService yaml)
    Creates an instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the number of processed items.
    <I> void
    process(String inType, I data)
     

    Methods inherited from class de.iip_ecosphere.platform.services.environment.PythonAsyncProcessService

    activate, createScanInputThread, getLogger, migrate, passivate, processSync, reconfigure, sendToService, setState, start, stop, switchTo, update

    Methods inherited from class de.iip_ecosphere.platform.services.environment.AbstractPythonProcessService

    addParameterConfigurer, attachIngestor, compose, createAndCustomizeProcess, createScanInputThread, customizePythonArgs, enableFileDeletion, getAvgResponseTime, getHome, getInTypeInfo, getLocationKey, getOutTypeInfo, getOutTypeName, getParameterConfigurer, getParameterNames, getPythonExecutable, getTypeSubstitutionsJson, handleErrorStream, handleResult, initializeFrom, isFileDeletionEnabled, registerInOutRelation, registerInputTypeTranslator, registerOutputTypeTranslator, scanInputStream, startExecutableByName, toJson, unbuffer

    Methods inherited from class de.iip_ecosphere.platform.services.environment.AbstractRunnablesService

    register

    Methods inherited from class de.iip_ecosphere.platform.services.environment.AbstractService

    addConfigurer, addConfigurer, addConfigurer, addTypeSubstitution, createGenericInstance, createGenericInstance, createGenericInstanceByPlugin, createGenericMultiInstance, createGenericMultiInstance, createGenericMultiInstanceByPlugin, createInstance, createInstance, createInstance, createInstanceByPlugin, getArg, getDescription, getId, getKind, getName, getNetMgtKeyAddress, getResourceAsStream, getState, getStringArg, getSubstitutedType, getTypeCreator, getTypeSubstitutions, getVersion, isDeployable, isTopLevel, notifyReconfigured, reconf, reconfigure, rollbackReconfigurationOnFailure, setLibJars, transferData

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface de.iip_ecosphere.platform.services.environment.GenericMultiTypeService

    processQuiet, processSyncQuiet

    Methods inherited from interface de.iip_ecosphere.platform.services.environment.Service

    addTypeSubstitution, createType, createType, getDescription, getKind, getName, getNetMgtKeyAddress, getSubstitutedType, getTypeCreator, getTypeSubstitutions, getVersion, isDeployable, isTopLevel

    Methods inherited from interface de.iip_ecosphere.platform.services.environment.switching.ServiceBase

    getId, getState
  • Field Details

    • countProcess

      private int countProcess
  • Constructor Details

    • CountingAsyncPythonProcessService

      public CountingAsyncPythonProcessService(de.iip_ecosphere.platform.services.environment.YamlService yaml)
      Creates an instance.
      Parameters:
      yaml - the YAML specification
  • Method Details

    • process

      public <I> void process(String inType, I data) throws ExecutionException
      Specified by:
      process in interface de.iip_ecosphere.platform.services.environment.GenericMultiTypeService
      Overrides:
      process in class de.iip_ecosphere.platform.services.environment.PythonAsyncProcessService
      Throws:
      ExecutionException
    • getCountProcess

      public int getCountProcess()
      Returns the number of processed items.
      Returns:
      the number