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

Examples of com.sun.jini.test.spec.activation.util.ExceptionThrowingProxy


        for (int i = 0; i < cases.length; i++) {
            Throwable testedException = cases[i];
            logger.log(Level.FINEST, "test case: " + testedException);
            FakeActivationID aid = new FakeActivationID(logger);
            // 1
            ExceptionThrowingProxy afup =
                    new ExceptionThrowingProxy(logger);
            // 2
            InvocationHandler handler2 = new
                    ActivatableInvocationHandler(aid, afup);
            // 3
            ExceptionThrowingInterface fakeProxy =
                    (ExceptionThrowingInterface) Proxy.newProxyInstance(
                        ExceptionThrowingInterface.class.getClassLoader(),
                        new Class[] {ExceptionThrowingInterface.class},
                        handler2);
            // 4
            FakeActivationID aid2 = new FakeActivationID(logger, fakeProxy,
                    true);
            // 5
            ExceptionThrowingProxy fup = new ExceptionThrowingProxy(logger);
            // 6
            InvocationHandler handler = new
                    ActivatableInvocationHandler(aid2, fup);
            // 7
            ExceptionThrowingInterface fi =
                    (ExceptionThrowingInterface) Proxy.newProxyInstance(
                        ExceptionThrowingInterface.class.getClassLoader(),
                        new Class[] {ExceptionThrowingInterface.class},
                        handler);
            try {
                // 8
                afup.exceptionForThrow(serverSideException);
                // 9
                fup.exceptionForThrow(testedException);
                // 10
                fi.throwsException();
                throw new TestException(
                        serverSideException.toString()
                        + " should be thrown");
View Full Code Here


        for (int i = 0; i < cases.length; i++) {
            Throwable testedException = cases[i];
            logger.log(Level.FINEST, "test case: " + testedException);
            FakeActivationID aid = new FakeActivationID(null);
            // 1
            ExceptionThrowingProxy fup = new ExceptionThrowingProxy(logger);
            // 2
            InvocationHandler handler = new
                    ActivatableInvocationHandler(aid, fup);
            // 3
            ExceptionThrowingInterface fi = (ExceptionThrowingInterface)
                Proxy.newProxyInstance(
                        ExceptionThrowingInterface.class.getClassLoader(),
                        new Class[] {ExceptionThrowingInterface.class},
                        handler);
            try {
                // 4
                fup.exceptionForThrow(testedException);
                // 5
                fi.throwsException();
                throw new TestException(
                        testedException.toString() + " should be thrown");
            } catch (Throwable t) {
View Full Code Here

TOP

Related Classes of com.sun.jini.test.spec.activation.util.ExceptionThrowingProxy

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.