public interface InterceptedMethod
Modifier and Type | Interface and Description |
---|---|
static class |
InterceptedMethod.ResultType
Possible result types.
|
Modifier and Type | Method and Description |
---|---|
<E extends Throwable> |
handleException(Exception exception)
Handle the exception that should be thrown out of the invocation.
|
Object |
handleResult(Object result)
Handle the value that should be the result of the invocation.
|
Object |
interceptResult()
Proceeds with invocation of
InvocationContext.proceed() and converts result to appropriate type. |
Object |
interceptResult(Interceptor<?,?> from)
Proceeds with invocation of
InvocationContext.proceed(Interceptor) and converts result to appropriate type. |
default CompletionStage<?> |
interceptResultAsCompletionStage()
Proceeds with invocation of
InvocationContext.proceed() and converts result to CompletionStage . |
default CompletionStage<?> |
interceptResultAsCompletionStage(Interceptor<?,?> from)
Proceeds with invocation of
InvocationContext.proceed(Interceptor) and converts result to CompletionStage . |
default Publisher<?> |
interceptResultAsPublisher()
Proceeds with invocation of
InvocationContext.proceed() and converts result to Publisher . |
default Publisher<?> |
interceptResultAsPublisher(ExecutorService executorService)
Proceeds with invocation of
InvocationContext.proceed() and converts result to Publisher . |
default 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 Object |
unsupported()
Indicated unsupported return type.
|
static InterceptedMethod of(MethodInvocationContext<?,?> context)
context
- The MethodInvocationContext
InterceptedMethod
InterceptedMethod.ResultType resultType()
InterceptedMethod.ResultType
Argument<?> returnTypeValue()
Object interceptResult()
InvocationContext.proceed()
and converts result to appropriate type.Object interceptResult(Interceptor<?,?> from)
InvocationContext.proceed(Interceptor)
and converts result to appropriate type.from
- The interceptor to start fromdefault CompletionStage<?> interceptResultAsCompletionStage()
InvocationContext.proceed()
and converts result to CompletionStage
.default Publisher<?> interceptResultAsPublisher()
InvocationContext.proceed()
and converts result to Publisher
.default Publisher<?> interceptResultAsPublisher(ExecutorService executorService)
InvocationContext.proceed()
and converts result to Publisher
.executorService
- The executor service to subscribe ondefault CompletionStage<?> interceptResultAsCompletionStage(Interceptor<?,?> from)
InvocationContext.proceed(Interceptor)
and converts result to CompletionStage
.from
- The interceptor to start fromdefault Publisher<?> interceptResultAsPublisher(Interceptor<?,?> from)
InvocationContext.proceed(Interceptor)
and converts result to Publisher
.from
- The interceptor to start fromObject handleResult(Object result)
result
- The result of the invocation<E extends Throwable> Object handleException(Exception exception) throws E extends Throwable
E
- Sneaky throws helperexception
- The exceptionE
- The exceptionE extends Throwable
default Object unsupported()