org.apache.beehive.controls.spi.svc
Interface Interceptor


public interface Interceptor

The controls implementation architecture has a interceptor model for adding annotation-based features. This model provides the ability to associate a JavaBeans service interface with an annotation to define its runtime feature behaviour. Such interfaces must extend this Interceptor interface, which defines the contract that the controls runtime has with interceptors. The controls runtime will automatically instantiate and execute implementations of interceptors at the appropriate execution points (pre/post invocation of a control operation, etc). The control runtime will continue the normal flow of control (ie, subsequent interceptors and operation/event execution) unless an interceptor throws a InterceptorPivotException. When this type of execption is encountered, the runtime will "pivot" out.


Method Summary
 void postEvent(ControlBean cb, Class eventSet, Method m, Object[] args, Object retval, Throwable t)
          Called after a control event is fired (through a client proxy)
 void postInvoke(ControlBean cb, Method m, Object[] args, Object retval, Throwable t)
          Called after a control operation is invoked
 void preEvent(ControlBean cb, Class eventSet, Method m, Object[] args)
          Called before a control event is fired (through a client proxy)
 void preInvoke(ControlBean cb, Method m, Object[] args)
          Called before a control operation is invoked
 

Method Detail

preInvoke

void preInvoke(ControlBean cb,
               Method m,
               Object[] args)
               throws InterceptorPivotException
Called before a control operation is invoked

Throws:
InterceptorPivotException

postInvoke

void postInvoke(ControlBean cb,
                Method m,
                Object[] args,
                Object retval,
                Throwable t)
Called after a control operation is invoked


preEvent

void preEvent(ControlBean cb,
              Class eventSet,
              Method m,
              Object[] args)
              throws InterceptorPivotException
Called before a control event is fired (through a client proxy)

Throws:
InterceptorPivotException

postEvent

void postEvent(ControlBean cb,
               Class eventSet,
               Method m,
               Object[] args,
               Object retval,
               Throwable t)
Called after a control event is fired (through a client proxy)