Package org.jboss.resteasy.core
Class SynchronousExecutionContext
- java.lang.Object
-
- org.jboss.resteasy.core.AbstractExecutionContext
-
- org.jboss.resteasy.core.SynchronousExecutionContext
-
- All Implemented Interfaces:
ResteasyAsynchronousContext
public class SynchronousExecutionContext extends AbstractExecutionContext
- Version:
- $Revision: 1 $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classSynchronousExecutionContext.SynchronousAsynchronousResponse
-
Field Summary
Fields Modifier and Type Field Description protected ResteasyAsynchronousResponseasynchronousResponseprotected booleandoneprotected java.lang.ObjectresponseLockprotected java.util.concurrent.CountDownLatchsyncLatchprotected longtimeoutprotected java.util.concurrent.TimeUnittimeoutUnitprotected booleanwasSuspended-
Fields inherited from class org.jboss.resteasy.core.AbstractExecutionContext
dispatcher, request, response
-
-
Constructor Summary
Constructors Constructor Description SynchronousExecutionContext(SynchronousDispatcher dispatcher, HttpRequest request, HttpResponse response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResteasyAsynchronousResponsegetAsyncResponse()booleanisSuspended()ResteasyAsynchronousResponsesuspend()ResteasyAsynchronousResponsesuspend(long millis)ResteasyAsynchronousResponsesuspend(long time, java.util.concurrent.TimeUnit unit)
-
-
-
Field Detail
-
syncLatch
protected final java.util.concurrent.CountDownLatch syncLatch
-
timeout
protected long timeout
-
timeoutUnit
protected java.util.concurrent.TimeUnit timeoutUnit
-
wasSuspended
protected boolean wasSuspended
-
done
protected volatile boolean done
-
responseLock
protected java.lang.Object responseLock
-
asynchronousResponse
protected ResteasyAsynchronousResponse asynchronousResponse
-
-
Constructor Detail
-
SynchronousExecutionContext
public SynchronousExecutionContext(SynchronousDispatcher dispatcher, HttpRequest request, HttpResponse response)
-
-
Method Detail
-
suspend
public ResteasyAsynchronousResponse suspend() throws java.lang.IllegalStateException
- Throws:
java.lang.IllegalStateException
-
suspend
public ResteasyAsynchronousResponse suspend(long millis) throws java.lang.IllegalStateException
- Throws:
java.lang.IllegalStateException
-
suspend
public ResteasyAsynchronousResponse suspend(long time, java.util.concurrent.TimeUnit unit) throws java.lang.IllegalStateException
- Throws:
java.lang.IllegalStateException
-
getAsyncResponse
public ResteasyAsynchronousResponse getAsyncResponse()
-
isSuspended
public boolean isSuspended()
-
-