org.apache.felix.ipojo.handlers.lifecycle.callback
Class LifecycleCallback

java.lang.Object
  extended by org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallback

public class LifecycleCallback
extends Object

This class is the implementation of callback on lifecycle transition.

Author:
Felix Project Team

Field Summary
protected static int INVALIDATE
          Valid to Invalid transition.
protected static int VALIDATE
          Invalid to Valid transition.
 
Constructor Summary
LifecycleCallback(LifecycleCallbackHandler handler, int transition, MethodMetadata method)
          LifecycleCallback constructor.
LifecycleCallback(LifecycleCallbackHandler handler, int transition, String method)
          LifecycleCallback constructor.
 
Method Summary
protected  void call()
          Call the callback method when the transition from inital tostate is detected.
protected  String getMethod()
          Get the method name of the callback.
protected  int getTransition()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALIDATE

protected static final int VALIDATE
Invalid to Valid transition.

See Also:
Constant Field Values

INVALIDATE

protected static final int INVALIDATE
Valid to Invalid transition.

See Also:
Constant Field Values
Constructor Detail

LifecycleCallback

public LifecycleCallback(LifecycleCallbackHandler handler,
                         int transition,
                         MethodMetadata method)
LifecycleCallback constructor.

Parameters:
handler - : the callback handler calling the callback
transition - : transition on which calling the callback
method - : method metadata to invoke

LifecycleCallback

public LifecycleCallback(LifecycleCallbackHandler handler,
                         int transition,
                         String method)
LifecycleCallback constructor.

Parameters:
handler - : the callback handler calling the callback
transition - : transition on which calling the callback
method - : method name to invoke
Method Detail

call

protected void call()
             throws NoSuchMethodException,
                    IllegalAccessException,
                    InvocationTargetException
Call the callback method when the transition from inital tostate is detected.

Throws:
NoSuchMethodException - : Method is not found in the class
InvocationTargetException - : The method is not static
IllegalAccessException - : The method can not be invoked

getTransition

protected int getTransition()

getMethod

protected String getMethod()
Get the method name of the callback.

Returns:
the method name


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.