public interface InterceptedMethod
Modifier and Type | Interface and Description |
---|---|
static class |
InterceptedMethod.ResultType
Possible result types.
|
Modifier and Type | Method and Description |
---|---|
<E extends java.lang.Throwable> |
handleException(java.lang.Exception exception)
Handle the exception that should be thrown out of the invocation.
|
java.lang.Object |
handleResult(java.lang.Object result)
Handle the value that should be the result of the invocation.
|
java.lang.Object |
interceptResult()
Proceeds with invocation of
InvocationContext.proceed() and converts result to appropriate type. |
java.lang.Object |
interceptResult(Interceptor<?,?> from)
Proceeds with invocation of
InvocationContext.proceed(Interceptor) and converts result to appropriate type. |
default java.util.concurrent.CompletionStage<?> |
interceptResultAsCompletionStage()
Proceeds with invocation of
InvocationContext.proceed() and converts result to CompletionStage . |
default java.util.concurrent.CompletionStage<?> |
interceptResultAsCompletionStage(Interceptor<?,?> from)
Proceeds with invocation of
InvocationContext.proceed(Interceptor) and converts result to CompletionStage . |
default org.reactivestreams.Publisher<?> |
interceptResultAsPublisher()
Proceeds with invocation of
InvocationContext.proceed() and converts result to Publisher . |
default org.reactivestreams.Publisher<?> |
interceptResultAsPublisher(java.util.concurrent.ExecutorService executorService)
Proceeds with invocation of
InvocationContext.proceed() and converts result to Publisher . |
default org.reactivestreams.Publisher<?> |
interceptResultAsPublisher(Interceptor<?,?> from)
Proceeds with invocation of
InvocationContext.proceed(Interceptor) and converts result to Publisher . |
static InterceptedMethod |
of(MethodInvocationContext<?,?> context)
Creates a new instance of intercept method supporting intercepting different reactive invocations.
|
InterceptedMethod.ResultType |
resultType()
Returns result type of the method.
|
Argument<?> |
returnTypeValue()
Returns result type value.
|
default java.lang.Object |
unsupported()
Indicated unsupported return type.
|
static InterceptedMethod of(MethodInvocationContext<?,?> context)
context
- The MethodInvocationContext
InterceptedMethod
InterceptedMethod.ResultType resultType()
InterceptedMethod.ResultType
Argument<?> returnTypeValue()
java.lang.Object interceptResult()
InvocationContext.proceed()
and converts result to appropriate type.java.lang.Object interceptResult(Interceptor<?,?> from)
InvocationContext.proceed(Interceptor)
and converts result to appropriate type.from
- The interceptor to start fromdefault java.util.concurrent.CompletionStage<?> interceptResultAsCompletionStage()
InvocationContext.proceed()
and converts result to CompletionStage
.default org.reactivestreams.Publisher<?> interceptResultAsPublisher()
InvocationContext.proceed()
and converts result to Publisher
.default org.reactivestreams.Publisher<?> interceptResultAsPublisher(java.util.concurrent.ExecutorService executorService)
InvocationContext.proceed()
and converts result to Publisher
.executorService
- The executor service to subscribe ondefault java.util.concurrent.CompletionStage<?> interceptResultAsCompletionStage(Interceptor<?,?> from)
InvocationContext.proceed(Interceptor)
and converts result to CompletionStage
.from
- The interceptor to start fromdefault org.reactivestreams.Publisher<?> interceptResultAsPublisher(Interceptor<?,?> from)
InvocationContext.proceed(Interceptor)
and converts result to Publisher
.from
- The interceptor to start fromjava.lang.Object handleResult(java.lang.Object result)
result
- The result of the invocation<E extends java.lang.Throwable> java.lang.Object handleException(java.lang.Exception exception) throws E extends java.lang.Throwable
E
- Sneaky throws helperexception
- The exceptionE
- The exceptionE extends java.lang.Throwable
default java.lang.Object unsupported()