Class Servlet3AsyncHttpRequest.Servlet3ExecutionContext.Servle3AsychronousResponse
java.lang.Object
org.jboss.resteasy.core.AbstractAsynchronousResponse
org.jboss.resteasy.plugins.server.servlet.Servlet3AsyncHttpRequest.Servlet3ExecutionContext.Servle3AsychronousResponse
- All Implemented Interfaces:
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
FieldsModifier and TypeFieldDescriptionprotected WeakReference<Thread>
private Object
protected ScheduledFuture
Fields inherited from class org.jboss.resteasy.core.AbstractAsynchronousResponse
annotations, completionCallbacks, contextDataMap, dispatcher, method, request, response, responseFilters, timeoutHandler, writerInterceptors
Fields inherited from interface javax.ws.rs.container.AsyncResponse
NO_TIMEOUT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
cancel()
boolean
cancel
(int retryAfter) boolean
protected void
void
Callback by the initial http request thread.boolean
boolean
isDone()
boolean
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
boolean
boolean
setTimeout
(long time, 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
-
Field Details
-
responseLock
-
creatingThread
-
timeoutFuture
-
-
Constructor Details
-
Servle3AsychronousResponse
private Servle3AsychronousResponse()
-
-
Method Details
-
resume
- Specified by:
resume
in interfacejavax.ws.rs.container.AsyncResponse
-
resume
- 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
- Specified by:
setTimeout
in interfacejavax.ws.rs.container.AsyncResponse
- Throws:
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
- 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
- Specified by:
onComplete
in interfacejavax.servlet.AsyncListener
- Throws:
IOException
-
onTimeout
- Specified by:
onTimeout
in interfacejavax.servlet.AsyncListener
- Throws:
IOException
-
handleTimeout
protected void handleTimeout() -
onError
- Specified by:
onError
in interfacejavax.servlet.AsyncListener
- Throws:
IOException
-
onStartAsync
- Specified by:
onStartAsync
in interfacejavax.servlet.AsyncListener
- Throws:
IOException
-