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>
creatingThread
private java.lang.Object
responseLock
protected java.util.concurrent.ScheduledFuture
timeoutFuture
-
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 private
Servle3AsychronousResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
cancel()
boolean
cancel(int retryAfter)
boolean
cancel(java.util.Date retryAfter)
protected void
handleTimeout()
void
initialRequestThreadFinished()
Callback by the initial http request thread.boolean
isCancelled()
boolean
isDone()
boolean
isSuspended()
void
onComplete(javax.servlet.AsyncEvent asyncEvent)
void
onError(javax.servlet.AsyncEvent asyncEvent)
void
onStartAsync(javax.servlet.AsyncEvent asyncEvent)
void
onTimeout(javax.servlet.AsyncEvent asyncEvent)
boolean
resume(java.lang.Object entity)
boolean
resume(java.lang.Throwable exc)
boolean
setTimeout(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:
resume
in interfacejavax.ws.rs.container.AsyncResponse
-
resume
public boolean resume(java.lang.Throwable exc)
- Specified by:
resume
in interfacejavax.ws.rs.container.AsyncResponse
-
initialRequestThreadFinished
public void initialRequestThreadFinished()
Description copied from interface:ResteasyAsynchronousResponse
Callback 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:
initialRequestThreadFinished
in interfaceResteasyAsynchronousResponse
-
setTimeout
public boolean setTimeout(long time, java.util.concurrent.TimeUnit unit) throws java.lang.IllegalStateException
- Specified by:
setTimeout
in interfacejavax.ws.rs.container.AsyncResponse
- Throws:
java.lang.IllegalStateException
-
cancel
public boolean cancel()
- Specified by:
cancel
in interfacejavax.ws.rs.container.AsyncResponse
-
cancel
public boolean cancel(int retryAfter)
- Specified by:
cancel
in interfacejavax.ws.rs.container.AsyncResponse
-
cancel
public boolean cancel(java.util.Date retryAfter)
- Specified by:
cancel
in interfacejavax.ws.rs.container.AsyncResponse
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interfacejavax.ws.rs.container.AsyncResponse
-
isDone
public boolean isDone()
- Specified by:
isDone
in interfacejavax.ws.rs.container.AsyncResponse
-
isSuspended
public boolean isSuspended()
- Specified by:
isSuspended
in interfacejavax.ws.rs.container.AsyncResponse
-
onComplete
public void onComplete(javax.servlet.AsyncEvent asyncEvent) throws java.io.IOException
- Specified by:
onComplete
in interfacejavax.servlet.AsyncListener
- Throws:
java.io.IOException
-
onTimeout
public void onTimeout(javax.servlet.AsyncEvent asyncEvent) throws java.io.IOException
- Specified by:
onTimeout
in 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:
onError
in interfacejavax.servlet.AsyncListener
- Throws:
java.io.IOException
-
onStartAsync
public void onStartAsync(javax.servlet.AsyncEvent asyncEvent) throws java.io.IOException
- Specified by:
onStartAsync
in interfacejavax.servlet.AsyncListener
- Throws:
java.io.IOException
-
-