public final class QueuedAsynchronousInterceptor extends Object implements AsynchronousInterceptor
AsynchronousInterceptor.CancellationHandle, AsynchronousInterceptor.ResultHandler, AsynchronousInterceptor.ResultSupplierEMPTY_ARRAY| Constructor and Description |
|---|
QueuedAsynchronousInterceptor(Executor executor)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancelAll()
Cancel all currently waiting invocations.
|
int |
getQueueSize() |
AsynchronousInterceptor.CancellationHandle |
processInvocation(AsynchronousInterceptorContext context,
AsynchronousInterceptor.ResultHandler resultHandler)
Process an invocation.
|
public QueuedAsynchronousInterceptor(Executor executor)
executor - the executor to use to continue previously suspended invocationspublic void cancelAll()
public int getQueueSize()
public AsynchronousInterceptor.CancellationHandle processInvocation(AsynchronousInterceptorContext context, AsynchronousInterceptor.ResultHandler resultHandler)
AsynchronousInterceptorAsynchronousInterceptor.ResultHandler, otherwise the invocation may hang.
This method must return a handle which can be used to request cancellation.
processInvocation in interface AsynchronousInterceptorcontext - the interceptor context (not null)resultHandler - the handler for the invocation result (not null)null)Copyright © 2016 JBoss by Red Hat. All rights reserved.