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>asyncContextRefprivate java.util.concurrent.atomic.AtomicBooleancompletedprivate static intNEVER_TIMEOUT_VALUEprivate javax.servlet.http.HttpServletRequestrequestprivate javax.servlet.http.HttpServletResponseresponse
-
Constructor Summary
Constructors Modifier Constructor Description privateExtensionImpl(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomplete()Invoked upon a response writing completion when the response write is either committed or canceled.private javax.servlet.AsyncContextgetAsyncContext()voidsuspend()Invoked by the superiorContainerResponseWriterresponsible 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.IllegalStateExceptionDescription copied from interface:AsyncContextDelegateInvoked by the superiorContainerResponseWriterresponsible for writing the response when processing is to be suspended. An implementation can throw anUnsupportedOperationExceptionif suspend is not supported (the default behavior).- Specified by:
suspendin interfaceAsyncContextDelegate- Throws:
java.lang.IllegalStateException- if underlyingservlet requestthrows 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:AsyncContextDelegateInvoked upon a response writing completion when the response write is either committed or canceled.- Specified by:
completein interfaceAsyncContextDelegate
-
-