public static interface AsynchronousInterceptor.ResultHandler
| Modifier and Type | Method and Description |
|---|---|
void |
setCancelled()
Indicate that the invocation was cancelled.
|
void |
setException(Exception exception)
Indicate that the invocation failed.
|
void |
setResult(AsynchronousInterceptor.ResultSupplier resultSupplier)
Indicate that the invocation is complete, and that the result can be read from the given supplier.
|
default AsynchronousInterceptor.ResultHandler |
withAction(Runnable action)
Create a new result handler that delegates to this one but first performs an action.
|
default <T> AsynchronousInterceptor.ResultHandler |
withAction(T argument,
Consumer<T> action)
Create a new result handler that delegates to this one but first performs an action.
|
default <T,U> AsynchronousInterceptor.ResultHandler |
withAction(T arg1,
U arg2,
BiConsumer<T,U> action)
Create a new result handler that delegates to this one but first performs an action.
|
void setResult(AsynchronousInterceptor.ResultSupplier resultSupplier)
resultSupplier - the result supplier (must not be null)IllegalStateException - if one of the set*() methods was already calledvoid setCancelled()
IllegalStateException - if one of the set*() methods was already calledvoid setException(Exception exception)
exception - the failure cause (must not be null)IllegalStateException - if one of the set*() methods was already calleddefault <T,U> AsynchronousInterceptor.ResultHandler withAction(T arg1, U arg2, BiConsumer<T,U> action)
arg1 - the first argument to pass to actionarg2 - the second argument to pass to actionaction - the action to run (must not be null)null)default <T> AsynchronousInterceptor.ResultHandler withAction(T argument, Consumer<T> action)
argument - the argument to pass to actionaction - the action to run (must not be null)null)default AsynchronousInterceptor.ResultHandler withAction(Runnable action)
action - the action to run (must not be null)null)Copyright © 2016 JBoss by Red Hat. All rights reserved.