diff options
Diffstat (limited to 'java/sca/modules/node-api/src')
-rw-r--r-- | java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java index 23efdf729a..94df876a31 100644 --- a/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java +++ b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java @@ -90,9 +90,7 @@ public abstract class NodeFactory extends DefaultNodeConfigurationFactory { public <B> B getService(Class<B> businessInterface, String serviceName) { try { - return (B)node.getClass().getMethod("getService", Class.class, String.class).invoke(node, - businessInterface, - serviceName); + return (B)node.getClass().getMethod("getService", Class.class, String.class).invoke(node, businessInterface, serviceName); } catch (Throwable e) { handleException(e); return null; @@ -101,8 +99,7 @@ public abstract class NodeFactory extends DefaultNodeConfigurationFactory { public <B> ServiceReference<B> getServiceReference(Class<B> businessInterface, String serviceName) { try { - return (ServiceReference<B>)node.getClass().getMethod("getServiceReference", Class.class, String.class) - .invoke(node, businessInterface, serviceName); + return (ServiceReference<B>)node.getClass().getMethod("getServiceReference", Class.class, String.class).invoke(node, businessInterface, serviceName); } catch (Throwable e) { handleException(e); return null; @@ -354,17 +351,6 @@ public abstract class NodeFactory extends DefaultNodeConfigurationFactory { return createNode(configuration); } - private NodeConfiguration createConfiguration(Contribution... contributions) { - NodeConfigurationFactory factory = this; - NodeConfiguration configuration = factory.createNodeConfiguration(); - if (contributions != null) { - for (Contribution c : contributions) { - configuration.addContribution(c.getURI(), c.getLocation()); - } - } - return configuration; - } - /** * Creates a new SCA node using defaults for the contribution location and deployable composites. * By default, it uses the Thread context classloader to find META-INF/sca-contribution.xml or @@ -383,6 +369,17 @@ public abstract class NodeFactory extends DefaultNodeConfigurationFactory { Contribution[] contributions = getContributions(locations); return createNode(contributions); } + + private NodeConfiguration createConfiguration(Contribution... contributions) { + NodeConfigurationFactory factory = this; + NodeConfiguration configuration = factory.createNodeConfiguration(); + if (contributions != null) { + for (Contribution c : contributions) { + configuration.addContribution(c.getURI(), c.getLocation()); + } + } + return configuration; + } private Contribution[] getContributions(List<String> locations) { Contribution[] contributions = new Contribution[locations.size()]; |