Package org.apache.catalina.core
Class AsyncListenerWrapper
- java.lang.Object
-
- org.apache.catalina.core.AsyncListenerWrapper
-
public class AsyncListenerWrapper extends java.lang.ObjectWrapper for anAsyncListenerthat supports custom request and response objects for event customization.
-
-
Constructor Summary
Constructors Constructor Description AsyncListenerWrapper()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfireOnComplete(AsyncEvent event)Fires the onComplete event on the wrapped listener.voidfireOnError(AsyncEvent event)Fires the onError event on the wrapped listener.voidfireOnStartAsync(AsyncEvent event)Fires the onStartAsync event on the wrapped listener.voidfireOnTimeout(AsyncEvent event)Fires the onTimeout event on the wrapped listener.AsyncListenergetListener()Returns the wrapped async listener.voidsetListener(AsyncListener listener)Sets the async listener to wrap.voidsetServletRequest(ServletRequest servletRequest)Sets the custom servlet request to use for events.voidsetServletResponse(ServletResponse servletResponse)Sets the custom servlet response to use for events.
-
-
-
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
-
-