Class GatewayFunctionPoller<T>


  • public abstract class GatewayFunctionPoller<T>
    extends java.lang.Object
    This little helper class makes it easier to implement polling gateway function logic within a component. Simply extend one of these as an inner class on your component, and override the functions to run the gateway function and to consume the results. The function will be run on a background thread, optionally polled at a time interval. The results will be delivered on the EDT.
    • Constructor Detail

      • GatewayFunctionPoller

        public GatewayFunctionPoller​(LoggerEx log,
                                     long refreshRate)
    • Method Detail

      • getRefreshRate

        public long getRefreshRate()
      • setRefreshRate

        public void setRefreshRate​(long refreshRate)
      • shutdown

        public void shutdown()
      • scheduleQuery

        protected void scheduleQuery()
      • onValueReceived

        protected abstract void onValueReceived​(T value,
                                                QualityCode quality)
        This will be called when the object has been retrieved. This function will always be called on the EDT
      • verb

        protected abstract java.lang.String verb()
        Return a verb that describes what this poller does. Something like "query events". For logging.