Class AbstractValueProcessor

java.lang.Object
org.scictrl.csshell.epics.server.processor.AbstractValueProcessor
All Implemented Interfaces:
ValueProcessor
Direct Known Subclasses:
MemoryValueProcessor, OnDemandValueProcessor

public abstract class AbstractValueProcessor extends Object implements ValueProcessor

Abstract AbstractValueProcessor class.

Author:
igor@scictrl.com
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.apache.logging.log4j.Logger
    Logger.
    protected Record
    Record owning this processor.
    protected long
    Update time
    protected gov.aps.jca.dbr.DBRType
    Value type.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor for AbstractValueProcessor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Record has now reference to Database.
    void
    configure(Record record, org.apache.commons.configuration.HierarchicalConfiguration config)
    Configures the internals of value processor, provides reference to parent record and to configuration with root inside processor tag.
    getName.
    getRecord.
    long
    Return trigger interval in milliseconds, which indicates on which interval this processor wants to be processed by Database.
    gov.aps.jca.dbr.DBRType
    Returns preferred type of the processor.
    void
    Called by Database in interval set by the trigger parameter in milliseconds.

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.scictrl.csshell.epics.server.ValueProcessor

    getTimestamp, getValue, setValue
  • Field Details

    • record

      protected Record record
      Record owning this processor.
    • trigger

      protected long trigger
      Update time
    • type

      protected gov.aps.jca.dbr.DBRType type
      Value type.
    • log

      protected org.apache.logging.log4j.Logger log
      Logger.
  • Constructor Details

    • AbstractValueProcessor

      public AbstractValueProcessor()

      Constructor for AbstractValueProcessor.

  • Method Details

    • configure

      public void configure(Record record, org.apache.commons.configuration.HierarchicalConfiguration config)
      Configures the internals of value processor, provides reference to parent record and to configuration with root inside processor tag. Parent record is not yet initialized, so does not have reference to Database, the Database reference will be available during activate call.
      Specified by:
      configure in interface ValueProcessor
      Parameters:
      record - the parent record.
      config - configuration with room inside processor tag.
    • getType

      public gov.aps.jca.dbr.DBRType getType()
      Returns preferred type of the processor. Alternatively the processor can inspect actual type of parent record and adopt. This type will overwrite type from record, when record will be initialized with this processor.
      Specified by:
      getType in interface ValueProcessor
      Returns:
      the type which processor works with, possibly same as associated record.
    • getTrigger

      public long getTrigger()
      Return trigger interval in milliseconds, which indicates on which interval this processor wants to be processed by Database. If trigger is 0 or less, then it means that no processing is required.
      Specified by:
      getTrigger in interface ValueProcessor
      Returns:
      update interval in milliseconds or disabled if 0.
    • process

      public void process()
      Called by Database in interval set by the trigger parameter in milliseconds. Not called if trigger in 0.
      Specified by:
      process in interface ValueProcessor
    • activate

      public void activate()
      Record has now reference to Database. processor might want to connect to other records on this server or PVs on other servers. This can not be done until all records from configuration has been loaded. Call to this method signals to the processor that records has been loaded and linking to other values can be commenced.
      Specified by:
      activate in interface ValueProcessor
    • getName

      public String getName()

      getName.

      Specified by:
      getName in interface ValueProcessor
      Returns:
      a String object
    • getRecord

      public Record getRecord()

      getRecord.

      Specified by:
      getRecord in interface ValueProcessor
      Returns:
      a Record object
    • toString

      public String toString()
      Overrides:
      toString in class Object