Interface InvocationHandler<I extends Invocation>
-
- Type Parameters:
I
- type of invocation supported. This is usuallyMethodInvocation
- All Known Implementing Classes:
ForwardingHandler
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface InvocationHandler<I extends Invocation>
Handles an invocation of a execution point on a proxy and returns response.This is main interface to be implemented when creating proxies. Every call on the proxy will be passed to
handle(I)
, and result of this method will be returned by proxy.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
handle(I invocation)
Catches invocation executed on proxy and returns result that should be passed to the client.
-
-
-
Method Detail
-
handle
@Nullable Object handle(I invocation) throws Throwable
Catches invocation executed on proxy and returns result that should be passed to the client.- Parameters:
invocation
- invocation captured- Returns:
- successful result of invocation processing
- Throws:
Throwable
- exception that will be thrown on the call site
-
-