Package net.jini.jeri

Examples of net.jini.jeri.BasicJeriExporter.export()


            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")){
View Full Code Here


        BJETestService stub = null;
        BJETestServiceImpl service = new BJETestServiceImpl();
        try {
            //Export a remote object using the exporter constructed in step 1
            stub = (BJETestService)
                exporter.export(service);
        } catch (ExportException e) {
            log.fine("Exception thrown after call to export: "+ e.getMessage());
            throw new TestException(
                "Unexpected Exception after call to export",e);
        }
View Full Code Here

        t.start();
        ((TestServerEndpoint) se).redirect(getPort() + 1);
        TestService service = new TestServiceImpl();
        BasicJeriExporter exporter = new BasicJeriExporter(se,
            new BasicILFactory());
        TestService stub = (TestService) exporter.export(service);
        //Obtain a message to send for the test
        byte[] ball = new byte[800];
        Arrays.fill(ball, (byte)0x88);
        stub.bounce(ball);
        rd.stop();
View Full Code Here

        //initiate a listen operation
        TestServerEndpoint tse = new TestServerEndpoint(getListenPort());
        BasicJeriExporter exporter =
            new BasicJeriExporter(tse, new BasicILFactory());
        TestServiceImpl service = new TestServiceImpl();
        TestService stub = (TestService) exporter.export(service);
        TestEndpoint te = tse.getTestEndpoint();
        //make a call
        stub.doSomething();
        //Verify that the 3-arg connect method is called
        if (methodCalls.get(connect2)==null) {
View Full Code Here

            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);
View Full Code Here

        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: "
                + e.getMessage());
View Full Code Here

        BasicJeriExporter exporter =
            new BasicJeriExporter(ep,new BJETestILFactory(),true,true,id);
        //Export the remote object
        try {
            log.finest("Exporting " + exportee);
            exporter.export(exportee);
        } catch (ExportException e) {
            log.finer("Unexpected exception thrown while exporting service"
                + " " + e.getMessage());
            throw new TestException("Unsexpected ExportException"
                + " when exporting test service", e);
View Full Code Here

            new BasicJeriExporter(ep, new BJETestILFactory() ,true,true,id);
        //Export the remote object using the second exporter
        try {
            log.finest("Attempting second export using the same object, Uuid,"
                + " and ServerEnpoint");
            secondExporter.export(exportee);
            throw new TestException("An export exception was"
                + " not thrown when attempting to export the same object"
                + " twice with the same ServerEnpoint and Uuid");
        } catch (ExportException e) {
            //Verify that an export exception is thrown
View Full Code Here

        ConnectionTransportListener.registerListener(this);
        //initiate a listen operation
        BasicJeriExporter exporter = new BasicJeriExporter(
        new TestServerEndpoint(getListenPort()), new BasicILFactory());
        TestServiceImpl service = new TestServiceImpl();
        TestService stub = (TestService) exporter.export(service);
        //send a request and receive a response
        stub.doSomething();
        //Verify that checkPermissions is called
        if (methodCalls.get(checkPermissions)==null) {
            throw new TestException("The ServerConnectionManager"
View Full Code Here

        t.start();
        ((TestServerEndpoint) se).redirect(getPort() + 1);
        TestService service = new TestServiceImpl();
        BasicJeriExporter exporter = new BasicJeriExporter(se,
            new BasicILFactory());
        TestService stub = (TestService) exporter.export(service);
        //Obtain a message to send for the test
        byte[] ball = new byte[800];
        Arrays.fill(ball, (byte)0x88);
        stub.bounce(ball);
        rd.stop();
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.