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 |
|---|---|
void |
complete() |
CompletionStage<Void> |
executeAsyncIo(CompletionStage<Void> f) |
CompletionStage<Void> |
executeBlockingIo(RunnableWithException f,
boolean hasInterceptors) |
ResteasyAsynchronousResponse |
getAsyncResponse() |
boolean |
isSuspended() |
ResteasyAsynchronousResponse |
suspend() |
ResteasyAsynchronousResponse |
suspend(long millis) |
ResteasyAsynchronousResponse |
suspend(long time,
TimeUnit unit) |
initialRequestEnded, initialRequestStarted, isOnInitialRequestprotected 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
IllegalStateExceptionpublic ResteasyAsynchronousResponse suspend(long millis) throws IllegalStateException
IllegalStateExceptionpublic ResteasyAsynchronousResponse suspend(long time, TimeUnit unit) throws IllegalStateException
IllegalStateExceptionpublic ResteasyAsynchronousResponse getAsyncResponse()
public boolean isSuspended()
public void complete()
public CompletionStage<Void> executeBlockingIo(RunnableWithException f, boolean hasInterceptors)
public CompletionStage<Void> executeAsyncIo(CompletionStage<Void> f)
Copyright © 2020 JBoss by Red Hat. All rights reserved.