Class AsyncListenerWrapper

java.lang.Object
org.apache.catalina.core.AsyncListenerWrapper

public class AsyncListenerWrapper extends Object
Wrapper for an AsyncListener that supports custom request and response objects for event customization.
  • Constructor Details

    • AsyncListenerWrapper

      public AsyncListenerWrapper()
      Default constructor.
  • Method Details

    • fireOnStartAsync

      public void fireOnStartAsync(AsyncEvent event) throws IOException
      Fires the onStartAsync event on the wrapped listener.
      Parameters:
      event - The async event
      Throws:
      IOException - if an I/O error occurs
    • fireOnComplete

      public void fireOnComplete(AsyncEvent event) throws IOException
      Fires the onComplete event on the wrapped listener.
      Parameters:
      event - The async event
      Throws:
      IOException - if an I/O error occurs
    • fireOnTimeout

      public void fireOnTimeout(AsyncEvent event) throws IOException
      Fires the onTimeout event on the wrapped listener.
      Parameters:
      event - The async event
      Throws:
      IOException - if an I/O error occurs
    • fireOnError

      public void fireOnError(AsyncEvent event) throws IOException
      Fires the onError event on the wrapped listener.
      Parameters:
      event - The async event
      Throws:
      IOException - if an I/O error occurs
    • getListener

      public AsyncListener getListener()
      Returns the wrapped async listener.
      Returns:
      the async listener
    • setListener

      public void setListener(AsyncListener listener)
      Sets the async listener to wrap.
      Parameters:
      listener - the async listener
    • setServletRequest

      public void setServletRequest(ServletRequest servletRequest)
      Sets the custom servlet request to use for events.
      Parameters:
      servletRequest - the servlet request
    • setServletResponse

      public void setServletResponse(ServletResponse servletResponse)
      Sets the custom servlet response to use for events.
      Parameters:
      servletResponse - the servlet response