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

## Class LifecycleCallback

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

    public class LifecycleCallback
    extends java.lang.Object

This class is the implementation of callback on lifecycle transition.

Author:
  Felix Project Team

### Field Summary

Fields
`protected static int` `INVALIDATE` Valid to Invalid transition.
`protected static int` `VALIDATE` Invalid to Valid transition.

### Constructor Summary

Constructors
Constructor and Description
`LifecycleCallback(LifecycleCallbackHandler handler, int transition, MethodMetadata method)` LifecycleCallback constructor.
`LifecycleCallback(LifecycleCallbackHandler handler, int transition, java.lang.String method)` LifecycleCallback constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `call()` Call the callback method when the transition from inital tostate is detected.
`protected java.lang.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,
                             java.lang.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 java.lang.NoSuchMethodException,
                        java.lang.IllegalAccessException,
                        java.lang.reflect.InvocationTargetException

Call the callback method when the transition from inital tostate is detected.

Throws:
  `java.lang.NoSuchMethodException` - : Method is not found in the class
  `java.lang.reflect.InvocationTargetException` - : The method is not static
  `java.lang.IllegalAccessException` - : The method can not be invoked

#### getTransition

    protected int getTransition()

#### getMethod

    protected java.lang.String getMethod()

Get the method name of the callback.

Returns:
  the method name