Class Servlet3AsyncHttpRequest.Servlet3ExecutionContext.Servle3AsychronousResponse
- java.lang.Object
-
- org.jboss.resteasy.core.AbstractAsynchronousResponse
-
- org.jboss.resteasy.plugins.server.servlet.Servlet3AsyncHttpRequest.Servlet3ExecutionContext.Servle3AsychronousResponse
-
- All Implemented Interfaces:
java.util.EventListener,javax.servlet.AsyncListener,javax.ws.rs.container.AsyncResponse,ResteasyAsynchronousResponse
- Enclosing class:
- Servlet3AsyncHttpRequest.Servlet3ExecutionContext
private class Servlet3AsyncHttpRequest.Servlet3ExecutionContext.Servle3AsychronousResponse extends AbstractAsynchronousResponse implements javax.servlet.AsyncListener
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.ref.WeakReference<java.lang.Thread>creatingThreadprivate java.lang.ObjectresponseLockprotected java.util.concurrent.ScheduledFuturetimeoutFuture-
Fields inherited from class org.jboss.resteasy.core.AbstractAsynchronousResponse
annotations, completionCallbacks, contextDataMap, dispatcher, method, request, response, responseFilters, timeoutHandler, writerInterceptors
-
-
Constructor Summary
Constructors Modifier Constructor Description privateServle3AsychronousResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancancel()booleancancel(int retryAfter)booleancancel(java.util.Date retryAfter)protected voidhandleTimeout()voidinitialRequestThreadFinished()Callback by the initial http request thread.booleanisCancelled()booleanisDone()booleanisSuspended()voidonComplete(javax.servlet.AsyncEvent asyncEvent)voidonError(javax.servlet.AsyncEvent asyncEvent)voidonStartAsync(javax.servlet.AsyncEvent asyncEvent)voidonTimeout(javax.servlet.AsyncEvent asyncEvent)booleanresume(java.lang.Object entity)booleanresume(java.lang.Throwable exc)booleansetTimeout(long time, java.util.concurrent.TimeUnit unit)-
Methods inherited from class org.jboss.resteasy.core.AbstractAsynchronousResponse
completionCallbacks, getAnnotations, getMethod, getResponseFilters, getWriterInterceptors, internalResume, internalResume, register, register, register, register, setAnnotations, setMethod, setResponseFilters, setTimeoutHandler, setWriterInterceptors
-
-
-
-
Method Detail
-
resume
public boolean resume(java.lang.Object entity)
- Specified by:
resumein interfacejavax.ws.rs.container.AsyncResponse
-
resume
public boolean resume(java.lang.Throwable exc)
- Specified by:
resumein interfacejavax.ws.rs.container.AsyncResponse
-
initialRequestThreadFinished
public void initialRequestThreadFinished()
Description copied from interface:ResteasyAsynchronousResponseCallback by the initial http request thread. It is used to help simulate suspend/resume asynchronous semantics in containers that do not support asychronous HTTP. This method is a no-op in environments that support async HTTP.- Specified by:
initialRequestThreadFinishedin interfaceResteasyAsynchronousResponse
-
setTimeout
public boolean setTimeout(long time, java.util.concurrent.TimeUnit unit) throws java.lang.IllegalStateException- Specified by:
setTimeoutin interfacejavax.ws.rs.container.AsyncResponse- Throws:
java.lang.IllegalStateException
-
cancel
public boolean cancel()
- Specified by:
cancelin interfacejavax.ws.rs.container.AsyncResponse
-
cancel
public boolean cancel(int retryAfter)
- Specified by:
cancelin interfacejavax.ws.rs.container.AsyncResponse
-
cancel
public boolean cancel(java.util.Date retryAfter)
- Specified by:
cancelin interfacejavax.ws.rs.container.AsyncResponse
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelledin interfacejavax.ws.rs.container.AsyncResponse
-
isDone
public boolean isDone()
- Specified by:
isDonein interfacejavax.ws.rs.container.AsyncResponse
-
isSuspended
public boolean isSuspended()
- Specified by:
isSuspendedin interfacejavax.ws.rs.container.AsyncResponse
-
onComplete
public void onComplete(javax.servlet.AsyncEvent asyncEvent) throws java.io.IOException- Specified by:
onCompletein interfacejavax.servlet.AsyncListener- Throws:
java.io.IOException
-
onTimeout
public void onTimeout(javax.servlet.AsyncEvent asyncEvent) throws java.io.IOException- Specified by:
onTimeoutin interfacejavax.servlet.AsyncListener- Throws:
java.io.IOException
-
handleTimeout
protected void handleTimeout()
-
onError
public void onError(javax.servlet.AsyncEvent asyncEvent) throws java.io.IOException- Specified by:
onErrorin interfacejavax.servlet.AsyncListener- Throws:
java.io.IOException
-
onStartAsync
public void onStartAsync(javax.servlet.AsyncEvent asyncEvent) throws java.io.IOException- Specified by:
onStartAsyncin interfacejavax.servlet.AsyncListener- Throws:
java.io.IOException
-
-