Class AsyncListenerWrapper


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

      • AsyncListenerWrapper

        public AsyncListenerWrapper()
        Default constructor.
    • Method Detail

      • fireOnStartAsync

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

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

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

        public void fireOnError​(AsyncEvent event)
                         throws java.io.IOException
        Fires the onError event on the wrapped listener.
        Parameters:
        event - The async event
        Throws:
        java.io.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