Class TimeValueProcessor

All Implemented Interfaces:
PropertyChangeListener, EventListener, ValueProcessor

public class TimeValueProcessor extends MemoryValueProcessor implements PropertyChangeListener

TimeValueProcessor class.

Author:
igor@scictrl.com
  • Field Details

  • Constructor Details

    • TimeValueProcessor

      public TimeValueProcessor()

      Constructor for TimeValueProcessor.

    • TimeValueProcessor

      public TimeValueProcessor(String format)

      Constructor for TimeValueProcessor.

      Parameters:
      format - a String object
  • 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
      Overrides:
      configure in class MemoryValueProcessor
      Parameters:
      record - the parent record.
      config - configuration with room inside processor tag.
    • 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
      Overrides:
      process in class AbstractValueProcessor
    • process

      public Object process(long time, gov.aps.jca.dbr.Severity severity, gov.aps.jca.dbr.Status status, boolean notify)

      process.

      Parameters:
      time - a long
      severity - a Severity object
      status - a Status object
      notify - a boolean
      Returns:
      a Object object
    • convert

      public Object convert(long time)

      convert.

      Parameters:
      time - a long
      Returns:
      a Object object
    • propertyChange

      public void propertyChange(PropertyChangeEvent evt)
      Specified by:
      propertyChange in interface PropertyChangeListener
    • 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
      Overrides:
      activate in class MemoryValueProcessor