org.jboss.kernel.plugins.dependency
Class CollectionCallbackItem<T extends Collection<Object>>
java.lang.Object
org.jboss.util.JBossObject
org.jboss.dependency.plugins.AbstractCallbackItem<T>
org.jboss.dependency.plugins.OwnerCallbackItem<Class<?>,InvokeDispatchContext>
org.jboss.kernel.plugins.dependency.CollectionCallbackItem<T>
- Type Parameters:
T
- expected collection type
- All Implemented Interfaces:
- Cloneable, CallbackItem<Class<?>>, org.jboss.util.JBossInterface
- Direct Known Subclasses:
- CollectionCreatorCallbackItem
public abstract class CollectionCallbackItem<T extends Collection<Object>>
- extends OwnerCallbackItem<Class<?>,InvokeDispatchContext>
Collection callback item.
- Author:
- Ales Justin
Fields inherited from class org.jboss.util.JBossObject |
hashCode, log, toString |
Methods inherited from class org.jboss.util.JBossObject |
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, getHashCode, hashCode, list, notEqual, toShortString, toString, toStringImplementation |
cardinality
protected Cardinality cardinality
attribute
protected AttributeInfo attribute
CollectionCallbackItem
public CollectionCallbackItem(Class<?> name,
InvokeDispatchContext owner,
AttributeInfo attribute)
CollectionCallbackItem
public CollectionCallbackItem(Class<?> name,
ControllerState whenRequired,
ControllerState dependentState,
Cardinality cardinality,
InvokeDispatchContext context,
AttributeInfo attribute)
getCollectionParameterHolder
protected abstract T getCollectionParameterHolder()
- Create new collection impl instance - HashSet, ArrayList, ...
- Returns:
- new collection impl instance
fillHolder
protected T fillHolder(Controller controller)
throws Throwable
- Fill collection impl with existing context targets.
- Parameters:
controller
- the controller
- Returns:
- collection holder with target beans
- Throws:
Throwable
- for any error
execute
protected void execute(T holder)
throws Throwable
- Throws:
Throwable
createDependencyItem
protected DependencyItem createDependencyItem(ControllerContext owner)
- Description copied from class:
OwnerCallbackItem
- Create dependency - if it exists.
- Overrides:
createDependencyItem
in class OwnerCallbackItem<Class<?>,InvokeDispatchContext>
- Parameters:
owner
- if owner is controller context
- Returns:
- dependency or null if no such dependency exists
ownerCallback
public void ownerCallback(Controller controller,
boolean isInstallPhase)
throws Throwable
- Description copied from interface:
CallbackItem
- Execute callback when item added to controller.
- Specified by:
ownerCallback
in interface CallbackItem<Class<?>>
- Overrides:
ownerCallback
in class AbstractCallbackItem<Class<?>>
- Parameters:
controller
- the controllerisInstallPhase
- install or uninstall
- Throws:
Throwable
- for any error
changeCallback
public void changeCallback(Controller controller,
ControllerContext context,
boolean isInstallPhase)
throws Throwable
- Description copied from interface:
CallbackItem
- Execute callback with current changed context.
- Specified by:
changeCallback
in interface CallbackItem<Class<?>>
- Overrides:
changeCallback
in class OwnerCallbackItem<Class<?>,InvokeDispatchContext>
- Parameters:
controller
- the controllercontext
- the new contextisInstallPhase
- install or uninstall
- Throws:
Throwable
- for any error
removeUninstallingContext
protected void removeUninstallingContext(T holder,
ControllerContext context)
- Remove the uninstalling context from holder.
Since the context is about to change state -
not part of callback watched targets.
Can be overridden for different remove behaviour.
- Parameters:
holder
- collection holdercontext
- current context
Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.