Examples of RMCTEImpl


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

         *
         * @return proxy which implements RemoteMethodControl and
         *         TrustEquivalence but does not implement ProxyTrust interface
         */
        public Remote export(Remote impl) throws ExportException {
            return new RMCTEImpl();
        }
View Full Code Here

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

    /**
     * This method performs all actions mentioned in class description.
     *
     */
    public void run() throws Exception {
        RMCTEImpl mImpl = new RMCTEImpl();
        RemoteMethodControl main = (RemoteMethodControl)
                ProxyTrustUtil.newProxyInstance(mImpl);
        ProxyTrust boot = createValidBootProxy();
        ProxyTrustInvocationHandler ptih = createPTIH(main, boot);
        Object proxy = ProxyTrustUtil.newProxyInstance(
                new RMCTEImpl(), ptih);
        Method m = RemoteMethodControl.class.getDeclaredMethod(
                "setConstraints", new Class[] { MethodConstraints.class });
        MethodConstraints mc = new BasicMethodConstraints(
                new InvocationConstraints(
                    new InvocationConstraint[] { ClientAuthentication.YES },
                    null));
        Object res = ptihInvoke(ptih, proxy, m, new Object[] { mc });

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

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

        if (mImpl.getSetConstraintsArg() != mc) {
            // FAIL
            throw new TestException(
                    "'setConstraints' method of main proxy was called with "
                    + mImpl.getSetConstraintsArg()
                    + " argument while " + mc + " was expected.");
        }

        // PASS
        logger.fine("'setConstraints' method of main proxy was called with "
View Full Code Here

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

    /**
     * This method performs all actions mentioned in class description.
     *
     */
    public void run() throws Exception {
        RemoteMethodControl main = new RMCTEImpl();
        ProxyTrust boot = new RMCPTTEImpl();
        ProxyTrustInvocationHandler ptih = createPTIH(main, boot);
        MarshalledObject mo = new MarshalledObject(ptih);

        try {
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.