Class AbstractActiveBinding<P extends BindingProvider>

  • All Implemented Interfaces:
    BindingChangeListener, org.osgi.service.event.EventHandler

    public abstract class AbstractActiveBinding<P extends BindingProvider>
    extends AbstractBinding<P>
    Base class for active bindings which polls something and sends events frequently.
    Thomas Eichstaedt-Engelen - Initial contribution, Kai Kreuzer - Initial contribution
    • Field Detail

      • activeService

        protected AbstractActiveService activeService
        embedded active service to allow the binding to have some code executed in a given interval.
    • Constructor Detail

      • AbstractActiveBinding

        public AbstractActiveBinding()
    • Method Detail

      • setProperlyConfigured

        protected void setProperlyConfigured​(boolean properlyConfigured)
        Used to define whether this binding is fully configured so that it can be activated and used. Note that the implementation will automatically start the active service if true is passed as a parameter and there are binding providers available.
        properlyConfigured -
      • isProperlyConfigured

        protected boolean isProperlyConfigured()
        true if this binding is configured properly which means that all necessary data is available
      • execute

        protected abstract void execute()
        The working method which is called by the refresh thread frequently. Developers should put their binding code here.
      • getRefreshInterval

        protected abstract long getRefreshInterval()
        Returns the refresh interval to be used by the RefreshThread between to calls of the execute method.
        the refresh interval
      • getName

        protected abstract String getName()
        Returns the name of the Refresh thread.
        the name of the refresh thread.