org.jboss.dependency.plugins
Class AbstractLifecycleCallbackItem

java.lang.Object
  extended by org.jboss.dependency.plugins.AbstractLifecycleCallbackItem
All Implemented Interfaces:
LifecycleCallbackItem

public class AbstractLifecycleCallbackItem
extends Object
implements LifecycleCallbackItem

Version:
$Revision: 1.1 $
Author:
Kabir Khan

Constructor Summary
AbstractLifecycleCallbackItem(Object bean, ControllerState whenRequired, ControllerState dependentState, String installMethod, String uninstallMethod)
           
 
Method Summary
 Object getBean()
          Gets the target bean implementing this callback
 ControllerState getDependentState()
          The required state of the lifecycle callback bean
 ControllerState getWhenRequired()
          Get the target state of the bean this callback applies to indicating when this callback should trigger
 void install(ControllerContext ctx)
          Call when the target bean is installed
 String toString()
           
 void uninstall(ControllerContext ctx)
          Call when the target bean is uninstalled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractLifecycleCallbackItem

public AbstractLifecycleCallbackItem(Object bean,
                                     ControllerState whenRequired,
                                     ControllerState dependentState,
                                     String installMethod,
                                     String uninstallMethod)
Method Detail

getBean

public Object getBean()
Description copied from interface: LifecycleCallbackItem
Gets the target bean implementing this callback

Specified by:
getBean in interface LifecycleCallbackItem
Returns:
the target bean name

getDependentState

public ControllerState getDependentState()
Description copied from interface: LifecycleCallbackItem
The required state of the lifecycle callback bean

Specified by:
getDependentState in interface LifecycleCallbackItem
Returns:
the dependant state

getWhenRequired

public ControllerState getWhenRequired()
Description copied from interface: LifecycleCallbackItem
Get the target state of the bean this callback applies to indicating when this callback should trigger

Specified by:
getWhenRequired in interface LifecycleCallbackItem
Returns:
the state

install

public void install(ControllerContext ctx)
             throws Exception
Description copied from interface: LifecycleCallbackItem
Call when the target bean is installed

Specified by:
install in interface LifecycleCallbackItem
Parameters:
ctx - the context of the target bean
Throws:
Exception - for any error

uninstall

public void uninstall(ControllerContext ctx)
Description copied from interface: LifecycleCallbackItem
Call when the target bean is uninstalled

Specified by:
uninstall in interface LifecycleCallbackItem
Parameters:
ctx - the context of the target bean

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.