Top Description Fields Constructors Methods
jakarta.servlet

public Class AsyncEvent

extends Object
Class Inheritance

Used to pass data to the methods of AsyncListener.
Since
Servlet 3.0

Field Summary

Modifier and TypeField and Description
private final AsyncContext
private final ServletRequest
private final ServletResponse
private final Throwable

Constructor Summary

AccessConstructor and Description
public
AsyncEvent(AsyncContext
The asynchronous context associated with the event
context
)

Creates an instance using the provide parameters.

public
AsyncEvent(AsyncContext
The asynchronous context associated with the event
context
,
ServletRequest
The request associated with the event
request
,
ServletResponse
The response associated with the event
response
)

Creates an instance using the provide parameters.

public
AsyncEvent(AsyncContext
The asynchronous context associated with the event
context
,
Throwable
The throwable associated with the event
throwable
)

Creates an instance using the provide parameters.

public
AsyncEvent(AsyncContext
The asynchronous context associated with the event
context
,
ServletRequest
The request associated with the event
request
,
ServletResponse
The response associated with the event
response
,
Throwable
The throwable associated with the event
throwable
)

Creates an instance using the provide parameters.

Method Summary

Modifier and TypeMethod and Description
public AsyncContext

Returns:

The asynchronous context associated with the event or null if one was not specified
getAsyncContext
()

Obtain the asynchronous context associated with the event.

public ServletRequest

Returns:

The request associated with the event or null if one was not specified
getSuppliedRequest
()

Obtain the request associated with the event.

public ServletResponse

Returns:

The response associated with the event or null if one was not specified
getSuppliedResponse
()

Obtain the response associated with the event.

public Throwable

Returns:

The throwable associated with the event or null if one was not specified
getThrowable
()

Obtain the throwable associated with the event.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextback to summary
private final AsyncContext context
requestback to summary
private final ServletRequest request
responseback to summary
private final ServletResponse response
throwableback to summary
private final Throwable throwable

Constructor Detail

AsyncEventback to summary
public AsyncEvent(AsyncContext context)

Creates an instance using the provide parameters.

Parameters
context:AsyncContext

The asynchronous context associated with the event

AsyncEventback to summary
public AsyncEvent(AsyncContext context, ServletRequest request, ServletResponse response)

Creates an instance using the provide parameters.

Parameters
context:AsyncContext

The asynchronous context associated with the event

request:ServletRequest

The request associated with the event

response:ServletResponse

The response associated with the event

AsyncEventback to summary
public AsyncEvent(AsyncContext context, Throwable throwable)

Creates an instance using the provide parameters.

Parameters
context:AsyncContext

The asynchronous context associated with the event

throwable:Throwable

The throwable associated with the event

AsyncEventback to summary
public AsyncEvent(AsyncContext context, ServletRequest request, ServletResponse response, Throwable throwable)

Creates an instance using the provide parameters.

Parameters
context:AsyncContext

The asynchronous context associated with the event

request:ServletRequest

The request associated with the event

response:ServletResponse

The response associated with the event

throwable:Throwable

The throwable associated with the event

Method Detail

getAsyncContextback to summary
public AsyncContext getAsyncContext()

Obtain the asynchronous context associated with the event.

Returns:AsyncContext

The asynchronous context associated with the event or null if one was not specified

getSuppliedRequestback to summary
public ServletRequest getSuppliedRequest()

Obtain the request associated with the event.

Returns:ServletRequest

The request associated with the event or null if one was not specified

getSuppliedResponseback to summary
public ServletResponse getSuppliedResponse()

Obtain the response associated with the event.

Returns:ServletResponse

The response associated with the event or null if one was not specified

getThrowableback to summary
public Throwable getThrowable()

Obtain the throwable associated with the event.

Returns:Throwable

The throwable associated with the event or null if one was not specified