Package com.sun.jini.test.spec.jrmp.util

Examples of com.sun.jini.test.spec.jrmp.util.TestRemoteInterface


        } else {
            // PASS
            logger.log(Level.FINE, "Method returned true as expected.");
        }
        JrmpExporter je3 = createJrmpExporter();
        TestRemoteInterface stub = (TestRemoteInterface) je3.export(tro);
        Unexporter u = new Unexporter(je3, false);
        logger.log(Level.FINE,
                "Start thread which will invoke unexport method"
                + " of constructed JrmpExporter3 with 'false' value...");
        u.start();
        stub.wait(new Integer(5000));
        uRes = u.getResult();

        if (uRes) {
            // FAIL
            throw new TestException(
                    "performed unexport method invocation of constructed "
                    + "JrmpExporter3 with 'false' value while remote "
                    + "call is in progress has returned true "
                    + "while false is expected.");
        } else {
            // PASS
            logger.log(Level.FINE, "Method returned false as expected.");
        }
        u = new Unexporter(je3, true);
        logger.log(Level.FINE,
                "Start thread which will invoke unexport method"
                + " of constructed JrmpExporter3 with 'true' value...");
        u.start();
        stub.wait(new Integer(5000));
        uRes = u.getResult();

        if (!uRes) {
            // FAIL
            throw new TestException(
View Full Code Here


        // step 2
        ORB orb = ORB.init(new String[0], null);
        IiopExporter ie = new IiopExporter(orb);
        TestRemoteObject tro = new TestRemoteObject();
        TestRemoteInterface stub = (TestRemoteInterface) ie.export(tro);

        if (stub.checkGetServerContext().booleanValue()) {
            // FAIL
            throw new TestException(
                    "Result of getServerContext invocation when there are "
                    + "no JRMP remote calls in progress but there is a "
                    + "IIOP remote call in progress does not satisfy "
                    + "specification.");
        } else {
            // PASS
            logger.log(Level.FINE,
                    "Result of getServerContext invocation when there "
                    + "are no JRMP remote calls in progress but there is a "
                    + "IIOP remote call in progress satisfies "
                    + "specification.");
        }

        // unexport object
        ie.unexport(true);

        // step 3
        JrmpExporter je = createJrmpExporter();
        tro = new TestRemoteObject();
        stub = (TestRemoteInterface) je.export(tro);

        if (!stub.checkGetServerContext().booleanValue()) {
            // FAIL
            throw new TestException(
                    "Result of getServerContext invocation when there is a "
                    + "remote call in progress does not satisfy "
                    + "specification.");
View Full Code Here

TOP

Related Classes of com.sun.jini.test.spec.jrmp.util.TestRemoteInterface

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.