Examples of BJETestService


Examples of com.sun.jini.test.spec.jeri.basicjeriexporter.util.BJETestService

            new TestServerEndpoint(),
                new BJETestILFactory());
        //export a remote object using the exporter
        BJETestServiceImpl service = new BJETestServiceImpl();
        try {
            final BJETestService stub = (BJETestService)
                exporter.export(service);
            //make a blocking call on the server
            Thread t = new Thread(new Runnable() {
                public void run(){
                    try {
                        stub.doSomethingLong();
                    } catch (RemoteException e) {
                        e.printStackTrace();
                    }
                }
            });
View Full Code Here

Examples of com.sun.jini.test.spec.jeri.basicjeriexporter.util.BJETestService

            TcpServerEndpoint.getInstance(0),
                new BJETestILFactory());
        //export a remote object using the exporter
        BJETestServiceImpl service = new BJETestServiceImpl();
        try {
            final BJETestService stub = (BJETestService)
                exporter.export(service);
            //make a blocking call on the server
            Thread t = new Thread(new Runnable() {
                public void run(){
                    try {
                        stub.doSomethingLong();
                    } catch (RemoteException e) {
                        e.printStackTrace();
                    }
                }
            });
View Full Code Here

Examples of com.sun.jini.test.spec.jeri.basicjeriexporter.util.BJETestService

        BasicJeriExporter exporter = new BasicJeriExporter(new
            BJETestServerEndpoint(TcpServerEndpoint.getInstance(listenPort)),
            new BJETestILFactory(),false,false);
        BJETestServiceImpl service = new BJETestServiceImpl();
        try {
            BJETestService stub = (BJETestService)
                exporter.export(service);
            cl1 = Thread.currentThread().getContextClassLoader();
            stub.doSomething();
            //verify that the listen method was called on the server
            //endpoint class;
            if (methodCalled("listen")){
                //verify that the createInstances method is called
                if (methodCalled("createInvocationDispatcher")){
View Full Code Here

Examples of com.sun.jini.test.spec.jeri.basicjeriexporter.util.BJETestService

        //Create an exporter instance
        int listenPort = config.getIntConfigVal("com.sun.jini.test.spec.jeri"
            + ".basicjeriexporter.listenPort", 9090);
        BasicJeriExporter exporter = new BasicJeriExporter(
            TcpServerEndpoint.getInstance(listenPort), new BJETestILFactory());
        BJETestService stub = null;
        BJETestServiceImpl service = new BJETestServiceImpl();
        try {
            //Export a remote object using the exporter constructed in step 1
            stub = (BJETestService)
                exporter.export(service);
View Full Code Here

Examples of com.sun.jini.test.spec.jeri.basicjeriexporter.util.BJETestService

        BasicJeriExporter exporter = new BasicJeriExporter(
            TcpServerEndpoint.getInstance(listenPort), new BJETestILFactory());
        BJETestServiceImpl service = new BJETestServiceImpl();
        try {
            //Export a remote object using the exporter constructed in step 1
            BJETestService stub = (BJETestService)
                exporter.export(service);
        } catch (ExportException e) {
            log.fine("Exception thrown after first call to export: "
                + e.getMessage());
            throw new TestException(
                "Unexpected Exception after first call to export",e);
        }
        BJETestServiceImpl service2 = new BJETestServiceImpl();
        try {
            //Export another remote object using the same exporter that
            //was used in step 2
            BJETestService stub =
                (BJETestService) exporter.export(service2);
        } catch (IllegalStateException e) {
            //OK
        } catch (ExportException e) {
            log.fine("Unexpected exception thrown after second call to export: "
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.