Class AbstractPollingTransportListener<T extends AbstractPollTableEntry>

All Implemented Interfaces:
org.apache.axis2.kernel.TransportListener

public abstract class AbstractPollingTransportListener<T extends AbstractPollTableEntry> extends AbstractTransportListenerEx<T>
  • Constructor Details

    • AbstractPollingTransportListener

      public AbstractPollingTransportListener()
  • Method Details

    • doInit

      protected void doInit() throws org.apache.axis2.AxisFault
      Description copied from class: AbstractTransportListenerEx
      Initialize the transport. This method will be called after the initialization work in AbstractTransportListener and before the first endpoint is created, i.e. before the first call to AbstractTransportListenerEx.createEndpoint().
      Specified by:
      doInit in class AbstractTransportListenerEx<T extends AbstractPollTableEntry>
      Throws:
      org.apache.axis2.AxisFault
    • destroy

      public void destroy()
      Specified by:
      destroy in interface org.apache.axis2.kernel.TransportListener
      Overrides:
      destroy in class AbstractTransportListener
    • startEndpoint

      protected void startEndpoint(T endpoint) throws org.apache.axis2.AxisFault
      Specified by:
      startEndpoint in class AbstractTransportListenerEx<T extends AbstractPollTableEntry>
      Throws:
      org.apache.axis2.AxisFault
    • stopEndpoint

      protected void stopEndpoint(T endpoint)
      Specified by:
      stopEndpoint in class AbstractTransportListenerEx<T extends AbstractPollTableEntry>
    • poll

      protected abstract void poll(T entry)
    • onPollCompletion

      protected void onPollCompletion(T entry)
    • processFailure

      protected void processFailure(String msg, Exception e, T entry)
      method to log a failure to the log file and to update the last poll status and time
      Parameters:
      msg - text for the log message
      e - optional exception encountered or null
      entry - the PollTableEntry
    • pause

      public void pause() throws org.apache.axis2.AxisFault
      Pause the listener - Stop accepting/processing new messages, but continues processing existing messages until they complete. This helps bring an instance into a maintenence mode
      Overrides:
      pause in class AbstractTransportListener
      Throws:
      org.apache.axis2.AxisFault - on error
    • resume

      public void resume() throws org.apache.axis2.AxisFault
      Resume the lister - Brings the lister into active mode back from a paused state
      Overrides:
      resume in class AbstractTransportListener
      Throws:
      org.apache.axis2.AxisFault - on error
    • maintenenceShutdown

      public void maintenenceShutdown(long millis) throws org.apache.axis2.AxisFault
      Stop processing new messages, and wait the specified maximum time for in-flight requests to complete before a controlled shutdown for maintenence
      Overrides:
      maintenenceShutdown in class AbstractTransportListener
      Parameters:
      millis - a number of milliseconds to wait until pending requests are allowed to complete
      Throws:
      org.apache.axis2.AxisFault - on error