Package io.jexxa.adapterapi.invocation
Class DefaultInvocationHandler
java.lang.Object
io.jexxa.adapterapi.invocation.DefaultInvocationHandler
- All Implemented Interfaces:
AfterInterceptor,AroundInterceptor,BeforeInterceptor,JexxaInvocationHandler
public class DefaultInvocationHandler
extends Object
implements AroundInterceptor, BeforeInterceptor, AfterInterceptor, JexxaInvocationHandler
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafter(InvocationContext invocationContext) voidaround(InvocationContext invocationContext) voidbefore(InvocationContext invocationContext) protected voidinvoke(InvocationContext invocationContext) <T> voidinvoke(Object targetObject, SerializableConsumer<T> consumer, T argument) This method performs a method invocation on given consumer.<T,R> R invoke(Object targetObject, SerializableFunction<T, R> function, T argument) This method performs a method invocation on given function.voidinvoke(Object targetObject, SerializableRunnable runnable) This method performs a method invocation on given runnable.<T> Tinvoke(Object targetObject, SerializableSupplier<T> supplier) This method performs a method invocation on given supplier.This method performs a method invocation on given method.registerAfter(AfterInterceptor interceptor) registerAround(AroundInterceptor interceptor) registerBefore(BeforeInterceptor interceptor)
-
Field Details
-
GLOBAL_SYNCHRONIZATION_OBJECT
-
-
Constructor Details
-
DefaultInvocationHandler
public DefaultInvocationHandler()
-
-
Method Details
-
before
- Specified by:
beforein interfaceBeforeInterceptor
-
after
- Specified by:
afterin interfaceAfterInterceptor
-
around
- Specified by:
aroundin interfaceAroundInterceptor
-
registerAround
-
registerBefore
-
registerAfter
-
invoke
Description copied from interface:JexxaInvocationHandlerThis method performs a method invocation on given method.- Specified by:
invokein interfaceJexxaInvocationHandler- Parameters:
method- Method that should be called. Must not be nullobject- concrete instance of the object on which the method should be calledargs- attributes- Returns:
- result of the method
-
invoke
Description copied from interface:JexxaInvocationHandlerThis method performs a method invocation on given runnable.- Specified by:
invokein interfaceJexxaInvocationHandler- Parameters:
targetObject- to invoke method onrunnable- functional interface to be executed
-
invoke
Description copied from interface:JexxaInvocationHandlerThis method performs a method invocation on given consumer.- Specified by:
invokein interfaceJexxaInvocationHandler- Parameters:
targetObject- to invoke method onconsumer- functional interface to be executedargument- for the functional interface
-
invoke
Description copied from interface:JexxaInvocationHandlerThis method performs a method invocation on given supplier.- Specified by:
invokein interfaceJexxaInvocationHandler- Parameters:
targetObject- to invoke method onsupplier- functional interface to be executed- Returns:
- T return value of the functional interface
-
invoke
Description copied from interface:JexxaInvocationHandlerThis method performs a method invocation on given function.- Specified by:
invokein interfaceJexxaInvocationHandler- Parameters:
targetObject- to invoke method onfunction- functional interface to be executedargument- for the functional interface- Returns:
- T return value of the functional interface
-
invoke
-