Class AsyncContextDelegateProviderImpl.ExtensionImpl
java.lang.Object
org.glassfish.jersey.servlet.async.AsyncContextDelegateProviderImpl.ExtensionImpl
- All Implemented Interfaces:
AsyncContextDelegate
- Enclosing class:
AsyncContextDelegateProviderImpl
private static final class AsyncContextDelegateProviderImpl.ExtensionImpl
extends Object
implements AsyncContextDelegate
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AtomicReference
<javax.servlet.AsyncContext> private final AtomicBoolean
private static final int
private final javax.servlet.http.HttpServletRequest
private final javax.servlet.http.HttpServletResponse
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ExtensionImpl
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) -
Method Summary
Modifier and TypeMethodDescriptionvoid
complete()
Invoked upon a response writing completion when the response write is either committed or canceled.private javax.servlet.AsyncContext
void
suspend()
Invoked by the superiorContainerResponseWriter
responsible for writing the response when processing is to be suspended.
-
Field Details
-
NEVER_TIMEOUT_VALUE
private static final int NEVER_TIMEOUT_VALUE- See Also:
-
request
private final javax.servlet.http.HttpServletRequest request -
response
private final javax.servlet.http.HttpServletResponse response -
asyncContextRef
-
completed
-
-
Constructor Details
-
ExtensionImpl
private ExtensionImpl(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) - Parameters:
request
- request to createAsyncContext
for.response
- response to createAsyncContext
for.
-
-
Method Details
-
suspend
Description copied from interface:AsyncContextDelegate
Invoked by the superiorContainerResponseWriter
responsible for writing the response when processing is to be suspended. An implementation can throw anUnsupportedOperationException
if suspend is not supported (the default behavior).- Specified by:
suspend
in interfaceAsyncContextDelegate
- Throws:
IllegalStateException
- if underlyingservlet request
throws an exception.- See Also:
-
getAsyncContext
private javax.servlet.AsyncContext getAsyncContext() -
complete
public void complete()Description copied from interface:AsyncContextDelegate
Invoked upon a response writing completion when the response write is either committed or canceled.- Specified by:
complete
in interfaceAsyncContextDelegate
-