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,org.jboss.dependency.spi.dispatch.InvokeDispatchContext>
org.jboss.kernel.plugins.dependency.CollectionCallbackItem<T>
- Type Parameters:
T - expected collection type
- All Implemented Interfaces:
- Cloneable, org.jboss.dependency.spi.CallbackItem<Class>, org.jboss.util.JBossInterface
- Direct Known Subclasses:
- CollectionCreatorCallbackItem
public abstract class CollectionCallbackItem<T extends Collection<Object>>
- extends org.jboss.dependency.plugins.OwnerCallbackItem<Class,org.jboss.dependency.spi.dispatch.InvokeDispatchContext>
Collection callback item.
- Author:
- Ales Justin
| Fields inherited from class org.jboss.dependency.plugins.OwnerCallbackItem |
owner |
| Fields inherited from class org.jboss.dependency.plugins.AbstractCallbackItem |
attributeName, dependentState, name, whenRequired |
| Fields inherited from class org.jboss.util.JBossObject |
hashCode, log, toString |
|
Constructor Summary |
CollectionCallbackItem(Class name,
org.jboss.dependency.spi.ControllerState whenRequired,
org.jboss.dependency.spi.ControllerState dependentState,
org.jboss.dependency.spi.Cardinality cardinality,
org.jboss.dependency.spi.dispatch.InvokeDispatchContext context,
AttributeInfo attribute)
|
CollectionCallbackItem(Class name,
org.jboss.dependency.spi.dispatch.InvokeDispatchContext owner,
AttributeInfo attribute)
|
|
Method Summary |
void |
changeCallback(org.jboss.dependency.spi.Controller controller,
org.jboss.dependency.spi.ControllerContext context,
boolean isInstallPhase)
|
protected org.jboss.dependency.spi.DependencyItem |
createDependencyItem(org.jboss.dependency.spi.ControllerContext owner)
|
protected void |
execute(T holder)
|
protected T |
fillHolder(org.jboss.dependency.spi.Controller controller)
Fill collection impl with existing context targets. |
protected abstract T |
getCollectionParameterHolder()
Create new collection impl instance - HashSet, ArrayList, ... |
void |
ownerCallback(org.jboss.dependency.spi.Controller controller,
boolean isInstallPhase)
|
protected void |
removeUninstallingContext(T holder,
org.jboss.dependency.spi.ControllerContext context)
Remove the uninstalling context from holder. |
| Methods inherited from class org.jboss.dependency.plugins.OwnerCallbackItem |
addDependency, toString |
| Methods inherited from class org.jboss.dependency.plugins.AbstractCallbackItem |
changeCallback, getAttributeName, getDependentState, getIDependOn, getWhenRequired, toShortString |
| Methods inherited from class org.jboss.util.JBossObject |
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, getHashCode, hashCode, list, notEqual, toShortString, toString, toStringImplementation |
cardinality
protected org.jboss.dependency.spi.Cardinality cardinality
attribute
protected AttributeInfo attribute
CollectionCallbackItem
public CollectionCallbackItem(Class name,
org.jboss.dependency.spi.dispatch.InvokeDispatchContext owner,
AttributeInfo attribute)
CollectionCallbackItem
public CollectionCallbackItem(Class name,
org.jboss.dependency.spi.ControllerState whenRequired,
org.jboss.dependency.spi.ControllerState dependentState,
org.jboss.dependency.spi.Cardinality cardinality,
org.jboss.dependency.spi.dispatch.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(org.jboss.dependency.spi.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 org.jboss.dependency.spi.DependencyItem createDependencyItem(org.jboss.dependency.spi.ControllerContext owner)
- Overrides:
createDependencyItem in class org.jboss.dependency.plugins.OwnerCallbackItem<Class,org.jboss.dependency.spi.dispatch.InvokeDispatchContext>
ownerCallback
public void ownerCallback(org.jboss.dependency.spi.Controller controller,
boolean isInstallPhase)
throws Throwable
- Specified by:
ownerCallback in interface org.jboss.dependency.spi.CallbackItem<Class>- Overrides:
ownerCallback in class org.jboss.dependency.plugins.AbstractCallbackItem<Class>
- Throws:
Throwable
changeCallback
public void changeCallback(org.jboss.dependency.spi.Controller controller,
org.jboss.dependency.spi.ControllerContext context,
boolean isInstallPhase)
throws Throwable
- Specified by:
changeCallback in interface org.jboss.dependency.spi.CallbackItem<Class>- Overrides:
changeCallback in class org.jboss.dependency.plugins.OwnerCallbackItem<Class,org.jboss.dependency.spi.dispatch.InvokeDispatchContext>
- Throws:
Throwable
removeUninstallingContext
protected void removeUninstallingContext(T holder,
org.jboss.dependency.spi.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 ? 2007 JBoss Inc.. All Rights Reserved.