Class SimpleSourceMonikaImpl

java.lang.Object
de.iip_ecosphere.platform.services.environment.AbstractService
de.iip_ecosphere.platform.services.environment.DefaultServiceImpl
de.iip_ecosphere.platform.test.apps.serviceImpl.SimpleSourceMonikaImpl
All Implemented Interfaces:
de.iip_ecosphere.platform.services.environment.ParameterConfigurerProvider, de.iip_ecosphere.platform.services.environment.Service, de.iip_ecosphere.platform.services.environment.switching.ServiceBase, iip.interfaces.SimpleDataSource3Interface

public class SimpleSourceMonikaImpl extends de.iip_ecosphere.platform.services.environment.DefaultServiceImpl implements iip.interfaces.SimpleDataSource3Interface
A simple test source ingesting data according to a timer schema. Analogously, a connector can be linked to a data ingestor.
Author:
Holger Eichelberger, SSE
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private Random
     
    private Timer
     

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

    APPLICATION_SEPARATOR, DEFAULT_APPLICATION_INSTANCE_ID

    Fields inherited from interface iip.interfaces.SimpleDataSource3Interface

    SERVICE_ID
  • Constructor Summary

    Constructors
    Constructor
    Description
    Fallback constructor.
    Creates a service instance from a service id and a YAML artifact.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    attachRec13Ingestor(de.iip_ecosphere.platform.services.environment.DataIngestor<iip.datatypes.Rec13> ingestor)
    Called by the platform to attach an asynchronous data ingestor for type "Rec1".
    iip.datatypes.Rec13
    Creates data to be ingested.

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

    migrate, switchTo, update

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

    activate, 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, initializeFrom, isDeployable, isTopLevel, notifyReconfigured, passivate, reconf, reconfigure, reconfigure, rollbackReconfigurationOnFailure, setLibJars, setState, start, stop, 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.Service

    activate, addTypeSubstitution, createType, createType, getDescription, getKind, getName, getNetMgtKeyAddress, getParameterConfigurer, getParameterNames, getSubstitutedType, getTypeCreator, getTypeSubstitutions, getVersion, isDeployable, isTopLevel, migrate, passivate, reconfigure, switchTo, update

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

    getId, getState, setState
  • Field Details

    • timer

      private Timer timer
    • random

      private Random random
  • Constructor Details

    • SimpleSourceMonikaImpl

      public SimpleSourceMonikaImpl()
      Fallback constructor.
    • SimpleSourceMonikaImpl

      public SimpleSourceMonikaImpl(String serviceId, InputStream ymlFile)
      Creates a service instance from a service id and a YAML artifact.
      Parameters:
      serviceId - the service id
      ymlFile - the YML file containing the YAML artifact with the service descriptor
  • Method Details

    • produceRec13

      public iip.datatypes.Rec13 produceRec13()
      Creates data to be ingested.
      Specified by:
      produceRec13 in interface iip.interfaces.SimpleDataSource3Interface
      Returns:
      the created data, null for no data
    • attachRec13Ingestor

      public void attachRec13Ingestor(de.iip_ecosphere.platform.services.environment.DataIngestor<iip.datatypes.Rec13> ingestor)
      Called by the platform to attach an asynchronous data ingestor for type "Rec1".
      Parameters:
      ingestor - the "Rec13" ingestor instance