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 $
 - Author:
 - Bill Burke
 
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classSynchronousExecutionContext.SynchronousAsynchronousResponse 
- 
Field Summary
Fields Modifier and Type Field Description protected ResteasyAsynchronousResponseasynchronousResponseprotected booleandoneprotected ObjectresponseLockprotected CountDownLatchsyncLatchprotected longtimeoutprotected 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 voidcomplete()CompletionStage<Void>executeAsyncIo(CompletionStage<Void> f)CompletionStage<Void>executeBlockingIo(RunnableWithException f, boolean hasInterceptors)ResteasyAsynchronousResponsegetAsyncResponse()booleanisSuspended()ResteasyAsynchronousResponsesuspend()ResteasyAsynchronousResponsesuspend(long millis)ResteasyAsynchronousResponsesuspend(long time, TimeUnit unit)- 
Methods inherited from class org.jboss.resteasy.core.AbstractExecutionContext
initialRequestEnded, initialRequestStarted, isOnInitialRequest 
 - 
 
 - 
 
- 
- 
Field Detail
- 
syncLatch
protected final CountDownLatch syncLatch
 
- 
timeout
protected long timeout
 
- 
timeoutUnit
protected TimeUnit timeoutUnit
 
- 
wasSuspended
protected boolean wasSuspended
 
- 
done
protected volatile boolean done
 
- 
responseLock
protected Object responseLock
 
- 
asynchronousResponse
protected ResteasyAsynchronousResponse asynchronousResponse
 
 - 
 
- 
Constructor Detail
- 
SynchronousExecutionContext
public SynchronousExecutionContext(SynchronousDispatcher dispatcher, HttpRequest request, HttpResponse response)
 
 - 
 
- 
Method Detail
- 
suspend
public ResteasyAsynchronousResponse suspend() throws IllegalStateException
- Throws:
 IllegalStateException
 
- 
suspend
public ResteasyAsynchronousResponse suspend(long millis) throws IllegalStateException
- Throws:
 IllegalStateException
 
- 
suspend
public ResteasyAsynchronousResponse suspend(long time, TimeUnit unit) throws IllegalStateException
- Throws:
 IllegalStateException
 
- 
getAsyncResponse
public ResteasyAsynchronousResponse getAsyncResponse()
 
- 
isSuspended
public boolean isSuspended()
 
- 
complete
public void complete()
 
- 
executeBlockingIo
public CompletionStage<Void> executeBlockingIo(RunnableWithException f, boolean hasInterceptors)
 
- 
executeAsyncIo
public CompletionStage<Void> executeAsyncIo(CompletionStage<Void> f)
 
 - 
 
 -