diff options
Diffstat (limited to '')
-rw-r--r-- | sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java b/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java index 5efaa97841..b8bfbee356 100644 --- a/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java +++ b/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java @@ -59,6 +59,8 @@ public abstract class NodeFactory extends DefaultNodeConfigurationFactory { protected static NodeFactory instance; protected static Class<?> factoryImplClass; + + protected static List<NodeFactory> factories = new ArrayList<NodeFactory>(); protected static void setNodeFactory(NodeFactory factory) { instance = factory; @@ -174,6 +176,7 @@ public abstract class NodeFactory extends DefaultNodeConfigurationFactory { } catch (Exception e) { throw new ServiceRuntimeException(e); } + factories.add(nodeFactory); return nodeFactory; } @@ -474,6 +477,11 @@ public abstract class NodeFactory extends DefaultNodeConfigurationFactory { public void destroy() { count = 0; instance = null; + factories.remove(this); + } + + public static List<NodeFactory> getNodeFactories() { + return factories; } /** |