Package chapter3.helloWorld

Examples of chapter3.helloWorld.HelloWorld


            StatusImpl.appendStatus("Exception caught on node.startComposite", "LifecycleTestCase.testInitExceptionShutdownS");
        }
       
        // send a message to the appropriate client
        try {
            Helloworld hwCE = node.getService(Helloworld.class, "HelloworldClientS");
            System.out.println(hwCE.sayHello("name"));
        } catch (Exception exception) {
            // the component throws an error on init
            StatusImpl.appendStatus("Exception caught on sayHello()", "LifecycleTestCase.testInitExceptionShutdownS");
        }        
       
View Full Code Here


            // it's thrown from the HelloworldClientImpl @Destroy method
            StatusImpl.appendStatus("Exception caught on node.startComposite", "LifecycleTestCase.testDestroyExceptionShutdownC");
        }
       
        // send a message to the appropriate client
        Helloworld hwCE = node.getService(Helloworld.class, "HelloworldClientC");
        System.out.println(hwCE.sayHello("name"))
        // don't need to catch exception here as the component instance won't
        // be destroyed until shutdown
       
        // stop a composite
        try {
View Full Code Here

            StatusImpl.appendStatus("Exception caught on node.startComposite", "LifecycleTestCase.testDestroyExceptionShutdownS");
        }
       
        // send a message to the appropriate client
        try {
            Helloworld hwCE = node.getService(Helloworld.class, "HelloworldClientS");
            System.out.println(hwCE.sayHello("name"));
        } catch (Exception exception) {
            // exception will be thrown when component instance is discarded
            // after the message has been processed
        }             
       
View Full Code Here

       
        // start a composite
        node.startComposite("HelloworldContrib", "lifecycle.composite");
       
        // send a message to each client. The last one throws and exception
        Helloworld hwCE = node.getService(Helloworld.class, "HelloworldClientCE");
        System.out.println(hwCE.sayHello("name"));
        Helloworld hwC = node.getService(Helloworld.class, "HelloworldClientC");
        System.out.println(hwC.sayHello("name"));
        Helloworld hwS = node.getService(Helloworld.class, "HelloworldClientC");
        System.out.println(hwS.sayHello("name"));  
        try {
            Helloworld hw = node.getService(Helloworld.class, "HelloworldC");
            hw.throwException("name");
        } catch (Exception ex) {
            // do nothing
            StatusImpl.appendStatus("Exception caught on throwException()", "LifecycleTestCase.testAppExceptionShutdown");
        }
       
View Full Code Here

TOP

Related Classes of chapter3.helloWorld.HelloWorld

Copyright © 2018 www.massapicom. 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.