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 java.lang.Object implements AsyncContextDelegate
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.atomic.AtomicReference<javax.servlet.AsyncContext>
asyncContextRef
private java.util.concurrent.atomic.AtomicBoolean
completed
private static int
NEVER_TIMEOUT_VALUE
private javax.servlet.http.HttpServletRequest
request
private javax.servlet.http.HttpServletResponse
response
-
Constructor Summary
Constructors Modifier Constructor Description private
ExtensionImpl(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
complete()
Invoked upon a response writing completion when the response write is either committed or canceled.private javax.servlet.AsyncContext
getAsyncContext()
void
suspend()
Invoked by the superiorContainerResponseWriter
responsible for writing the response when processing is to be suspended.
-
-
-
Field Detail
-
NEVER_TIMEOUT_VALUE
private static final int NEVER_TIMEOUT_VALUE
- See Also:
- Constant Field Values
-
request
private final javax.servlet.http.HttpServletRequest request
-
response
private final javax.servlet.http.HttpServletResponse response
-
asyncContextRef
private final java.util.concurrent.atomic.AtomicReference<javax.servlet.AsyncContext> asyncContextRef
-
completed
private final java.util.concurrent.atomic.AtomicBoolean completed
-
-
Method Detail
-
suspend
public void suspend() throws java.lang.IllegalStateException
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:
java.lang.IllegalStateException
- if underlyingservlet request
throws an exception.- See Also:
ContainerResponseWriter.suspend(long, java.util.concurrent.TimeUnit, org.glassfish.jersey.server.spi.ContainerResponseWriter.TimeoutHandler)
-
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
-
-