public final class ExecutorAsynchronousInterceptor extends Object implements AsynchronousInterceptor
AsynchronousInterceptor.CancellationHandle, AsynchronousInterceptor.ResultHandler, AsynchronousInterceptor.ResultSupplierEMPTY_ARRAY| Constructor and Description |
|---|
ExecutorAsynchronousInterceptor(Executor executor,
boolean onlyIfBlocking)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
AsynchronousInterceptor.CancellationHandle |
processInvocation(AsynchronousInterceptorContext context,
AsynchronousInterceptor.ResultHandler resultHandler)
Process an invocation.
|
public ExecutorAsynchronousInterceptor(Executor executor, boolean onlyIfBlocking)
executor - the executor to dispatch to (must not be null)onlyIfBlocking - true to only dispatch invocations that are blocking the caller; false to
dispatch all invocationspublic 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.