Class WithinContextInterceptor

java.lang.Object
org.tentackle.reflect.AbstractInterceptor
org.tentackle.pdo.WithinContextInterceptor
All Implemented Interfaces:
InvocationHandler, Interceptor

public final class WithinContextInterceptor extends AbstractInterceptor
Implementation for the WithinContext interception.
Author:
harald
  • Constructor Details

    • WithinContextInterceptor

      public WithinContextInterceptor()
      Creates a WithinContext interceptor.
  • Method Details

    • setAnnotation

      public void setAnnotation(Annotation annotation)
      Description copied from interface: Interceptor
      Sets the interceptor annotation.
      Specified by:
      setAnnotation in interface Interceptor
      Overrides:
      setAnnotation in class AbstractInterceptor
      Parameters:
      annotation - the annotation, null if none
    • proceed

      public Object proceed(Object proxy, Method method, Object[] args, Object orgProxy, Method orgMethod, Object[] orgArgs) throws Throwable
      Description copied from class: AbstractInterceptor
      The interceptor implementation.
      Specified by:
      proceed in class AbstractInterceptor
      Parameters:
      proxy - the object to invoke the method on, null if static
      method - the method to invoke
      args - the method's arguments
      orgProxy - the original proxy object, same as proxy if not chained
      orgMethod - the original method, same as method if not chained
      orgArgs - the original arguments, same as args if not chained
      Returns:
      the method's return value
      Throws:
      Throwable - if invoked method failed