public class SynchronousExecutionContext extends AbstractExecutionContext
Modifier and Type | Class and Description |
---|---|
protected class |
SynchronousExecutionContext.SynchronousAsynchronousResponse |
Modifier and Type | Field and Description |
---|---|
protected ResteasyAsynchronousResponse |
asynchronousResponse |
protected boolean |
done |
protected Object |
responseLock |
protected CountDownLatch |
syncLatch |
protected long |
timeout |
protected TimeUnit |
timeoutUnit |
protected boolean |
wasSuspended |
dispatcher, request, response
Constructor and Description |
---|
SynchronousExecutionContext(SynchronousDispatcher dispatcher,
HttpRequest request,
HttpResponse response) |
Modifier and Type | Method and Description |
---|---|
ResteasyAsynchronousResponse |
getAsyncResponse() |
boolean |
isSuspended() |
ResteasyAsynchronousResponse |
suspend() |
ResteasyAsynchronousResponse |
suspend(long millis) |
ResteasyAsynchronousResponse |
suspend(long time,
TimeUnit unit) |
protected final CountDownLatch syncLatch
protected long timeout
protected TimeUnit timeoutUnit
protected boolean wasSuspended
protected volatile boolean done
protected Object responseLock
protected ResteasyAsynchronousResponse asynchronousResponse
public SynchronousExecutionContext(SynchronousDispatcher dispatcher, HttpRequest request, HttpResponse response)
public ResteasyAsynchronousResponse suspend() throws IllegalStateException
IllegalStateException
public ResteasyAsynchronousResponse suspend(long millis) throws IllegalStateException
IllegalStateException
public ResteasyAsynchronousResponse suspend(long time, TimeUnit unit) throws IllegalStateException
IllegalStateException
public ResteasyAsynchronousResponse getAsyncResponse()
public boolean isSuspended()
Copyright © 2014. All Rights Reserved.