Package org.apache.tuscany.sca.node

Examples of org.apache.tuscany.sca.node.NodeFactory.createNode()


*/
public class CalculatorClient {
    public static void main(String[] args) throws Exception {       
       
      NodeFactory factory = NodeFactory.newInstance();
        Node node = factory.createNode(new File("src/main/resources/context/imports/ContextImports.composite").toURI().toURL().toString(),
                new Contribution("TestContribution", new File("src/main/resources/context/imports/").toURI().toURL().toString()));
        node.start();
             
        CalculatorService calculatorService =
            node.getService(CalculatorService.class, "CalculatorServiceComponent");
View Full Code Here


*/
public class CalculatorClient {
    public static void main(String[] args) throws Exception {       
       
      NodeFactory factory = NodeFactory.newInstance();
        Node node = factory.createNode(new File("src/main/resources/context/access/ContextAccess.composite").toURI().toURL().toString(),
                new Contribution("TestContribution", new File("src/main/resources/context/access/").toURI().toURL().toString()));
        node.start();
       
        // Code: To access the Spring Application Context instance
        ApplicationContext ctx = SCAApplicationContextProvider.getApplicationContext();
View Full Code Here

        NodeFactory factory = NodeFactory.getInstance();
        NodeConfiguration config1 =
            factory.createNodeConfiguration().setDomainURI(DOMAIN_URI).setURI("node1").addContribution("c1", ROOT)
                .addDeploymentComposite("c1", CLIENT).addDeploymentComposite("c1", SERVICE);

        Node node1 = factory.createNode(config1);
        node1.start();
        try {
            runClient(node1);
        } finally {
            node1.stop();
View Full Code Here

            System.setProperty("java.security.auth.login.config", CalculatorClient.class.getClassLoader()
                .getResource("implementation/policies/CalculatorJass.config").toString());
        }

        NodeFactory factory = NodeFactory.newInstance();
        Node node = factory.createNode(new File("src/main/resources/implementation/policies/ImplementationPolicies.composite").toURI().toURL().toString(),
                new Contribution("TestContribution", new File("src/main/resources/implementation/policies/").toURI().toURL().toString()));
        node.start();
             
        CalculatorService calculatorService =
            node.getService(CalculatorService.class, "CalculatorServiceComponent");
View Full Code Here

    }
   
    @Override
    protected void setUp() throws Exception {
      NodeFactory factory = NodeFactory.newInstance();     
      node = factory.createNode(new File("src/main/resources/" + contributionLocation + compositeName).toURI().toURL().toString(),
                new Contribution("TestContribution", new File("src/main/resources/" + contributionLocation).toURI().toURL().toString()));     
      node.start();
        service = node.getService(getServiceClass(), "ClientComponent");
    }
View Full Code Here

           
            System.out.println("Setting up nodes");
                 
            NodeFactory nodeFactory = NodeFactory.newInstance();
           
            nodeA = nodeFactory.createNode("nodeA/CompositeA.composite", new Contribution("contrib","target/classes"));
            nodeA.start();
           
            nodeB = nodeFactory.createNode("nodeB/CompositeB.composite", new Contribution("contrib","target/classes"));
            nodeB.start();
           
View Full Code Here

            NodeFactory nodeFactory = NodeFactory.newInstance();
           
            nodeA = nodeFactory.createNode("nodeA/CompositeA.composite", new Contribution("contrib","target/classes"));
            nodeA.start();
           
            nodeB = nodeFactory.createNode("nodeB/CompositeB.composite", new Contribution("contrib","target/classes"));
            nodeB.start();
           
            acomponent = nodeA.getService(AComponent.class, "AComponent/AComponent");
              
        } catch (Throwable ex) {
View Full Code Here

     */
    @BeforeClass
    public static void setUp() throws Exception {
        try {
        NodeFactory factory = NodeFactory.newInstance();
        node = factory.createNode(new File("src/main/resources/wsdl/wrapped/helloservice.composite").toURI().toURL().toString(),
                new Contribution("TestContribution", new File("src/main/resources/wsdl/wrapped/").toURI().toURL().toString()));
        node.start();
        }catch(Throwable e) {
            e.printStackTrace();
        }
View Full Code Here

*/
public class ComposerServer {

    public final static void main(String[] args) throws Exception {
      NodeFactory factory = NodeFactory.newInstance();
        Node node = factory.createNode(new File("src/main/resources/Outer.composite").toURI().toURL().toString(),
                new Contribution("TestContribution", new File("src/main/resources/").toURI().toURL().toString()));
        node.start();
        System.out.println("Press Enter to exit...");
        System.in.read();
        node.stop();
View Full Code Here

            configuration.setURI("node1");
            configuration.addContribution("c1", "./target/classes");
            configuration.addDeploymentComposite("c1","CallBackService.composite");

            //node1 = factory.createNode("CallBackService.composite", new Contribution("c1", "./target/classes"));
            node1 = factory.createNode(configuration);
            node1.start();
           
            configuration = factory.createNodeConfiguration();
            configuration.setDomainURI("tuscany:default");
            configuration.setURI("node2");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.