Class AsyncListenerWrapper
java.lang.Object
org.apache.catalina.core.AsyncListenerWrapper
Wrapper for an
AsyncListener that supports custom request and response objects
for event customization.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfireOnComplete(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.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.
-
Constructor Details
-
AsyncListenerWrapper
public AsyncListenerWrapper()Default constructor.
-
-
Method Details
-
fireOnStartAsync
Fires the onStartAsync event on the wrapped listener.- Parameters:
event- The async event- Throws:
IOException- if an I/O error occurs
-
fireOnComplete
Fires the onComplete event on the wrapped listener.- Parameters:
event- The async event- Throws:
IOException- if an I/O error occurs
-
fireOnTimeout
Fires the onTimeout event on the wrapped listener.- Parameters:
event- The async event- Throws:
IOException- if an I/O error occurs
-
fireOnError
Fires the onError event on the wrapped listener.- Parameters:
event- The async event- Throws:
IOException- if an I/O error occurs
-
getListener
-
setListener
Sets the async listener to wrap.- Parameters:
listener- the async listener
-
setServletRequest
Sets the custom servlet request to use for events.- Parameters:
servletRequest- the servlet request
-
setServletResponse
Sets the custom servlet response to use for events.- Parameters:
servletResponse- the servlet response
-