Package net.jini.activation

Examples of net.jini.activation.ActivatableInvocationHandler


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


     * This method performs all actions mentioned in class description.
     */
    public void run() throws Exception {
        FakeActivationID aid = new FakeActivationID(logger);
        RMCProxy fp = new RMCProxy(logger);
        ActivatableInvocationHandler handler = new
                ActivatableInvocationHandler(aid, fp);
        assertion(handler.checkTrustEquivalence(handler));
        Object o = new Object();
        assertion(!handler.checkTrustEquivalence(o));

        ActivationID aid2 = new FakeActivationID(logger);
        RMCProxy fp2 = new RMCProxy(logger);
        ActivatableInvocationHandler handler2 = new
                ActivatableInvocationHandler(aid, fp);
        aid.setTrustEquivalence(false);
        assertion(!handler.checkTrustEquivalence(handler2));
        aid.setTrustEquivalence(true);
        assertion(handler.checkTrustEquivalence(handler2));
View Full Code Here

    /**
     * This method performs all actions mentioned in class description.
     */
    public void run() throws Exception {
        ActivatableInvocationHandler handler;
        ActivationID aid = new FakeActivationID(logger);
        handler = new ActivatableInvocationHandler(aid, null);
        Object cp = handler.getCurrentProxy();
        assertion(cp == null);

        aid = new FakeActivationID(logger);
        MethodSetProxy fup = new MethodSetProxy(logger);
        handler = new ActivatableInvocationHandler(aid, fup);
        cp = handler.getCurrentProxy();
        assertion(fup == cp);

        fup = new MethodSetProxy(logger);
        aid = new FakeActivationID(logger);
        ActivatableInvocationHandler handler2 = new
                ActivatableInvocationHandler(aid, fup);
        RemoteMethodSetInterface fakeProxy = (RemoteMethodSetInterface)
                Proxy.newProxyInstance(
                        RemoteMethodSetInterface.class.getClassLoader(),
                        new Class[] {RemoteMethodSetInterface.class},
                        handler2);
        ActivationID aid2 = new FakeActivationID(logger, fakeProxy, true);
        // handler does not have an underlying proxy - activation will
        // be performed
        handler = new ActivatableInvocationHandler(aid2, null);
        RemoteMethodSetInterface fi = (RemoteMethodSetInterface)
                Proxy.newProxyInstance(
                        RemoteMethodSetInterface.class.getClassLoader(),
                        new Class[] {RemoteMethodSetInterface.class},
                        handler);
View Full Code Here

TOP

Related Classes of net.jini.activation.ActivatableInvocationHandler

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.