Package org.apache.tuscany.sca.node

Examples of org.apache.tuscany.sca.node.Node.stop()


        System.out.println("3 + 2=" + calculatorService.add(3, 2));
        System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
        System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
        System.out.println("3 / 2=" + calculatorService.divide(3, 2));

        node.stop();
        System.out.println("Bye");
    }

}
View Full Code Here


    private void bundleStopping(Bundle bundle) {
        Node node = factory.getNodes().get(bundle);
        if (node == null) {
            return;
        }
        node.stop();
    }

    public void serviceChanged(ServiceEvent event) {
    }
View Full Code Here

       
        System.out.println("3 + 2 = " + result);
       
        Assert.assertEquals(5.0, result);
       
        node.stop();
    }
}
View Full Code Here

       
        if (result != 5.0){
            throw new RuntimeException("Expected 5.0 but result was " + result);
        }
       
        node.stop();
    }
   
}
View Full Code Here

        Node node = null;
        if (configurator != null) {
            node = (Node)configurator.getAttribute(SCA_NODE_ATTRIBUTE);
        }
        if (node != null) {
            node.stop();
            configurator.setAttribute(SCA_NODE_ATTRIBUTE, null);
        }
    }

    public static void destroy() {
View Full Code Here

        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

        Node node = factory.createNode(new File("src/main/resources/Client.composite").toURI().toURL().toString(),
                new Contribution("TestContribution", new File("src/main/resources/").toURI().toURL().toString()));
        node.start();
        Composer composer = node.getService(Composer.class, "ClientComponent/Composer");
        System.out.println(composer.Compose("ABC"));
        node.stop();
    }

}
View Full Code Here

            if (! e.getCause().getClass().equals(InvalidAnnotationException.class)) {
                throw e;
            }
        } finally {
            if (node != null) {
                node.stop();
            }
        }
    }
}
View Full Code Here

            Assert.assertEquals("AComponent", response);
        } catch (ServiceRuntimeException ex){
            Assert.fail("Unexpected exception " + ex.toString());
        }
       
        node1.stop();
    }
 
    /**
     * Remotable client and service interfaces where the interfaces match.
     * Components running in the separate composite/JVM, i.e. there is a remote registry
View Full Code Here

        } catch (ServiceRuntimeException ex){
            Assert.fail("Unexpected exception with callback" + ex.toString());
        }       
       
        node1.stop();
        node2.stop();
    }
   
    /**
     * Remotable client and service interfaces where the interfaces match but
     * where there is a parameter that can't be converted to/from XML using JAXB
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.