[jboss-cvs] JBossAS SVN: r62604 - projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/dependency.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Apr 27 06:11:50 EDT 2007
Author: alesj
Date: 2007-04-27 06:11:50 -0400 (Fri, 27 Apr 2007)
New Revision: 62604
Modified:
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/dependency/BasicCollectionCallbackItemFactory.java
Log:
Additional hook for other collection classes.
Modified: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/dependency/BasicCollectionCallbackItemFactory.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/dependency/BasicCollectionCallbackItemFactory.java 2007-04-27 08:52:16 UTC (rev 62603)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/dependency/BasicCollectionCallbackItemFactory.java 2007-04-27 10:11:50 UTC (rev 62604)
@@ -65,6 +65,31 @@
else if (parameterClass.isAssignableFrom(LinkedList.class))
return new QueueCallbackItem(name, whenRequired, dependentState, cardinality, context, attribute);
else
- throw new IllegalArgumentException("No matching callback impl for parameter type: " + parameterClass);
+ return handleAdditionalCollectionClass(parameterClass, name, whenRequired, dependentState, cardinality, context, attribute);
}
+
+ /**
+ * Override for additional handling of
+ * collection callback item creaton via parameter class.
+ *
+ * @param parameterClass actual collection class
+ * @param name demand name
+ * @param whenRequired when required state
+ * @param dependentState dependent state
+ * @param cardinality the cardinality
+ * @param context invoke owner
+ * @param attribute the attribute
+ * @return new exact collection callback item
+ */
+ protected CollectionCallbackItem handleAdditionalCollectionClass(
+ Class<? extends Collection> parameterClass,
+ Class name,
+ ControllerState whenRequired,
+ ControllerState dependentState,
+ Cardinality cardinality,
+ InvokeDispatchContext context,
+ AttributeInfo attribute)
+ {
+ throw new IllegalArgumentException("No matching callback impl for parameter type: " + parameterClass);
+ }
}
More information about the jboss-cvs-commits
mailing list