Class AbstractActivePollingModule

All Implemented Interfaces:
IDynamicComponent, IProcessorActiveModule, IProcessorModule, IProcessorReceiverModule
Direct Known Subclasses:
AbstractDirectoryPollingModule

public abstract class AbstractActivePollingModule extends AbstractActiveReceiverModule
  • Field Details

  • Constructor Details

    • AbstractActivePollingModule

      public AbstractActivePollingModule()
  • Method Details

    • initDynamicComponent

      @OverridingMethodsMustInvokeSuper public void initDynamicComponent(@Nonnull IAS2Session aSession, @Nullable com.helger.commons.collection.attr.IStringMap aOptions) throws AS2Exception
      Description copied from interface: IDynamicComponent
      After creating a Component object, this method should be called to set any parameters used by the component. Component implementations typically have required parameter checking and code to start timers and threads within this method.
      Specified by:
      initDynamicComponent in interface IDynamicComponent
      Overrides:
      initDynamicComponent in class AbstractDynamicComponent
      Parameters:
      aSession - the component uses this object to access other components
      aOptions - configuration values for the component. All parameters will be stored as attributes of this component. All attributes existing before this method is called will be removed!
      Throws:
      AS2Exception - If an error occurs while initializing the component
      AS2InvalidParameterException - If a required parameter is null in the parameters Map
      See Also:
    • setInterval

      public void setInterval(long nSeconds)
      Set the interval in seconds.
      Parameters:
      nSeconds - Seconds to wait between polling.
    • getInterval

      @CheckForSigned public long getInterval()
      Returns:
      The seconds between polling operations.
    • isBusy

      public final boolean isBusy()
    • poll

      public abstract void poll()
      The abstract message that is called in the defined interval and needs to be overridden by subclasses.
    • doStart

      public void doStart() throws AS2Exception
      Description copied from class: AbstractActiveModule
      Implement the internal start logic.
      Specified by:
      doStart in class AbstractActiveModule
      Throws:
      AS2Exception - In case of an error.
    • doStop

      public void doStop() throws AS2Exception
      Description copied from class: AbstractActiveModule
      Implement the internal stop logic.
      Specified by:
      doStop in class AbstractActiveModule
      Throws:
      AS2Exception - In case of an error.