Class InputPolling

  • All Implemented Interfaces:
    adams.core.AdditionalInformationHandler, adams.core.CleanUpHandler, adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.QuickInfoSupporter, adams.core.ShallowCopySupporter<AbstractRatInput>, adams.core.SizeOfHandler, adams.core.Stoppable, adams.core.StoppableWithFeedback, PollingRatInput, RatInput, Serializable

    public class InputPolling
    extends AbstractMetaRatInput
    implements PollingRatInput
    Turns the base-input into one that performs polling every x msec.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
    -input <adams.flow.standalone.rats.RatInput> (property: input)
        The receiver to wrap.
        default: adams.flow.standalone.rats.DummyInput
    -wait-poll <int> (property: waitPoll)
        The number of milli-seconds to wait before polling again.
        default: 1000
        minimum: 0
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_WaitPoll

        protected int m_WaitPoll
        the waiting period in msec before polling again.
    • Constructor Detail

      • InputPolling

        public InputPolling()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        a description suitable for displaying in the gui
      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        defineOptions in class AbstractMetaRatInput
      • setWaitPoll

        public void setWaitPoll​(int value)
        Sets the number of milli-seconds to wait before polling.
        Specified by:
        setWaitPoll in interface PollingRatInput
        value - the number of milli-seconds
      • getWaitPoll

        public int getWaitPoll()
        Returns the number of milli-seconds to wait before polling again.
        Specified by:
        getWaitPoll in interface PollingRatInput
        the number of milli-seconds
      • waitPollTipText

        public String waitPollTipText()
        Returns the tip text for this property.
        Specified by:
        waitPollTipText in interface PollingRatInput
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getQuickInfo

        public String getQuickInfo()
        Returns a quick info about the actor, which will be displayed in the GUI.
        Specified by:
        getQuickInfo in interface adams.core.QuickInfoSupporter
        getQuickInfo in class AbstractMetaRatInput
        null if no info available, otherwise short string