Package javax.servlet
Class AsyncEvent
java.lang.Object
javax.servlet.AsyncEvent
Used to pass data to the methods of
AsyncListener
.- Since:
- Servlet 3.0
-
Constructor Summary
ConstructorDescriptionAsyncEvent
(AsyncContext context) Creates an instance using the provide parameters.AsyncEvent
(AsyncContext context, Throwable throwable) Creates an instance using the provide parameters.AsyncEvent
(AsyncContext context, ServletRequest request, ServletResponse response) Creates an instance using the provide parameters.AsyncEvent
(AsyncContext context, ServletRequest request, ServletResponse response, Throwable throwable) Creates an instance using the provide parameters. -
Method Summary
Modifier and TypeMethodDescriptionObtain the asynchronous context associated with the event.Obtain the request associated with the event.Obtain the response associated with the event.Obtain the throwable associated with the event.
-
Constructor Details
-
AsyncEvent
Creates an instance using the provide parameters.- Parameters:
context
- The asynchronous context associated with the event
-
AsyncEvent
Creates an instance using the provide parameters.- Parameters:
context
- The asynchronous context associated with the eventrequest
- The request associated with the eventresponse
- The response associated with the event
-
AsyncEvent
Creates an instance using the provide parameters.- Parameters:
context
- The asynchronous context associated with the eventthrowable
- The throwable associated with the event
-
AsyncEvent
public AsyncEvent(AsyncContext context, ServletRequest request, ServletResponse response, Throwable throwable) Creates an instance using the provide parameters.- Parameters:
context
- The asynchronous context associated with the eventrequest
- The request associated with the eventresponse
- The response associated with the eventthrowable
- The throwable associated with the event
-
-
Method Details
-
getAsyncContext
Obtain the asynchronous context associated with the event.- Returns:
- The asynchronous context associated with the event or
null
if one was not specified
-
getSuppliedRequest
Obtain the request associated with the event.- Returns:
- The request associated with the event or
null
if one was not specified
-
getSuppliedResponse
Obtain the response associated with the event.- Returns:
- The response associated with the event or
null
if one was not specified
-
getThrowable
Obtain the throwable associated with the event.- Returns:
- The throwable associated with the event or
null
if one was not specified
-