Package com.sun.jini.test.spec.security.proxytrust.util

Examples of com.sun.jini.test.spec.security.proxytrust.util.Interface1RMCTEImpl


     * This method performs all actions mentioned in class description.
     *
     */
    public void run() throws Exception {
        ProxyTrustInvocationHandler ptih = createPTIH(
                newMainProxy(new Interface1RMCTEImpl()),
                newBootProxy(new Interface2RMCPTTEImpl()));
        InvocationHandler[] ih = new InvocationHandler [] {
            new InvHandler(new Interface1RMCTEImpl()),
            createPTIH(newMainProxy(new Interface3RMCTEImpl()),
                       newBootProxy(new Interface2RMCPTTEImpl())),
            createPTIH(newMainProxy(new Interface1RMCTEImpl()),
                       newBootProxy(new Interface4RMCPTTEImpl())),
            createPTIH(newMainProxy(new Interface1RMCTEImpl()),
                       newBootProxy(new Interface2RMCPTTEImpl())),
            ptih };
        boolean[] expRes = new boolean[] { false, false, false, true, true };
        boolean res;

View Full Code Here


    /**
     * This method performs all actions mentioned in class description.
     *
     */
    public void run() throws Exception {
        RemoteMethodControl main = newMainProxy(new Interface1RMCTEImpl());
        ProxyTrust boot = newBootProxy(new Interface2RMCPTTEImpl());
        ProxyTrustInvocationHandler ptih = createPTIH(main, boot);
        InvocationHandler[] ih = new InvocationHandler [] {
            ptih,
            createPTIH(main,
                       newBootProxy(new Interface2RMCPTTEImpl())),
            createPTIH(newMainProxy(new Interface1RMCTEImpl()),
                       boot),
            new InvHandler(new Interface1RMCTEImpl()),
            createPTIH(main, boot) };
        boolean[] expRes = new boolean[] { true, false, false, false, true };
        boolean res;

        for (int i = 0; i < ih.length; ++i) {
View Full Code Here

        }

        // PASS
        logger.fine("'test' method of main proxy returned null "
                + "as expected.");
        Interface1RMCTEImpl mImpl1 = new Interface1RMCTEImpl();
        main = newMainProxy(mImpl1);
        ptih = createPTIH(main, boot);
        proxy = ProxyTrustUtil.newProxyInstance(new Interface1Impl(), ptih);
        m = TestInterface1.class.getDeclaredMethod("test1",
                new Class[] { int.class });
        res = ptihInvoke(ptih, proxy, m, new Object[] { new Integer(5) });

        if (mImpl1.getTest1Num() != 1) {
            // FAIL
            throw new TestException(
                    "'test1' method of main proxy was called "
                    + mImpl1.getTest1Num()
                    + " times while 1 was expected.");
        }

        // PASS
        logger.fine("'test1' method of main proxy was called "
                + " 1 time as expected.");

        if (((Integer) res).intValue() != 5) {
            // FAIL
            throw new TestException(
                    "'test1' method of main proxy returned " + res
                    + " while 5 was expected.");
        }

        // PASS
        logger.fine("'test1' method of main proxy returned 6 as expected.");
        m = TestInterface1.class.getDeclaredMethod("test", new Class[0]);
        res = ptihInvoke(ptih, proxy, m, null);

        if (mImpl1.getTestNum() != 1) {
            // FAIL
            throw new TestException(
                    "'test' method of main proxy was called "
                    + mImpl.getTestNum() + " times while 1 was expected.");
        }
View Full Code Here

        }

        // PASS
        logger.fine("'exTest' method of main proxy was called "
                + " 1 time as expected.");
        Interface1RMCTEImpl mImpl1 = new Interface1RMCTEImpl();
        main = newMainProxy(mImpl1);
        ptih = createPTIH(main, boot);
        proxy = ProxyTrustUtil.newProxyInstance(new Interface1Impl(), ptih);
        m = TestInterface1.class.getDeclaredMethod("exTest", new Class[0]);
View Full Code Here

TOP

Related Classes of com.sun.jini.test.spec.security.proxytrust.util.Interface1RMCTEImpl

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.