org.apache.aries.blueprint.container
Class QuiesceInterceptor

java.lang.Object
  extended by org.apache.aries.blueprint.container.QuiesceInterceptor
All Implemented Interfaces:
Interceptor

public class QuiesceInterceptor
extends java.lang.Object
implements Interceptor


Constructor Summary
QuiesceInterceptor(ServiceRecipe serviceRecipe)
           
 
Method Summary
 int getRank()
          Return the rank of the interceptor, which is used to determine the order of the interceptors to be invoked Rank is between Integer.MIN_VALUE and Integer.MAX_VALUE, interceptors are called in the order of highest value rank first to lowest value rank last i.e.
 void postCallWithException(ComponentMetadata cm, java.lang.reflect.Method m, java.lang.Throwable ex, java.lang.Object preCallToken)
          The method is called after the method m is invoked and causes an exception.
 void postCallWithReturn(ComponentMetadata cm, java.lang.reflect.Method m, java.lang.Object returnType, java.lang.Object preCallToken)
          This method is called after the method m is invoked and returned normally.
 java.lang.Object preCall(ComponentMetadata cm, java.lang.reflect.Method m, java.lang.Object... parameters)
          This is called just before the method m is invocation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuiesceInterceptor

public QuiesceInterceptor(ServiceRecipe serviceRecipe)
Method Detail

preCall

public java.lang.Object preCall(ComponentMetadata cm,
                                java.lang.reflect.Method m,
                                java.lang.Object... parameters)
                         throws java.lang.Throwable
Description copied from interface: Interceptor
This is called just before the method m is invocation.

Specified by:
preCall in interface Interceptor
Parameters:
cm - : the component's metada
Returns:
token which will subsequently be passed to postCall
Throws:
java.lang.Throwable

postCallWithReturn

public void postCallWithReturn(ComponentMetadata cm,
                               java.lang.reflect.Method m,
                               java.lang.Object returnType,
                               java.lang.Object preCallToken)
                        throws java.lang.Throwable
Description copied from interface: Interceptor
This method is called after the method m is invoked and returned normally.

Specified by:
postCallWithReturn in interface Interceptor
returnType - : the return object
preCallToken - token returned by preCall
Throws:
java.lang.Throwable

postCallWithException

public void postCallWithException(ComponentMetadata cm,
                                  java.lang.reflect.Method m,
                                  java.lang.Throwable ex,
                                  java.lang.Object preCallToken)
                           throws java.lang.Throwable
Description copied from interface: Interceptor
The method is called after the method m is invoked and causes an exception.

Specified by:
postCallWithException in interface Interceptor
Parameters:
cm - : the component metadata
m - : the method invoked
ex - : the Throwable thrown
preCallToken - token returned by preCall
Throws:
java.lang.Throwable

getRank

public int getRank()
Description copied from interface: Interceptor
Return the rank of the interceptor, which is used to determine the order of the interceptors to be invoked Rank is between Integer.MIN_VALUE and Integer.MAX_VALUE, interceptors are called in the order of highest value rank first to lowest value rank last i.e. an interceptor with rank Integer.MAX_VALUE will be called before all others (except of the same rank).

Specified by:
getRank in interface Interceptor
Returns:
the rank of the interceptor


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.