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

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


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


    public void run() throws Exception {
        int i;
        Object o;

        FakeActivationID aid = new FakeActivationID(null);
        MethodSetProxy fup = new MethodSetProxy(logger);
        InvocationHandler handler =
                new ActivatableInvocationHandler(aid, fup);
        RemoteMethodSetInterface fi = (RemoteMethodSetInterface)
                Proxy.newProxyInstance(
                        RemoteMethodSetInterface.class.getClassLoader(),
                        new Class[] {RemoteMethodSetInterface.class},
                        handler);
        fup.setInt(100);
        fi.voidReturn();
        assertion(fi.intReturn() == 110);

        fup.setInt(200);
        i = 1000;
        o = new Object();
        fi.voidReturn(i, o);
        assertion(fi.intReturn() == 1220);

        fup.setInt(300);
        i = 2000;
        fi.voidReturn(i);
        assertion(fi.intReturn() == 2330);

        o = new Object();
        fup.setObject(o);
        assertion(fi.objectReturn().equals(o));

        i = Integer.MIN_VALUE;
        fup.setInt(i);
        o = new Object();
        fup.setObject(o);
        assertion(fi.objectReturn(o, i).equals(o));

        i = i + 1;
        assertion(fi.objectReturn(i).equals(new Integer(i)));

        i = i + 1;
        fup.setInt(i);
        assertion(fi.intReturn() == i);

        i = i + 1;
        o = new Object();
        assertion(fi.intReturn(i, o) == i);
View Full Code Here

    public void run() throws Exception {
        int i;
        Object o;

        ActivationID aid = new FakeActivationID(logger);
        MethodSetProxy fup = new MethodSetProxy(logger);
        InvocationHandler 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);
        InvocationHandler handler = new ActivatableInvocationHandler(aid2,
                null);
        RemoteMethodSetInterface fi = (RemoteMethodSetInterface)
                Proxy.newProxyInstance(
                        RemoteMethodSetInterface.class.getClassLoader(),
                        new Class[] {RemoteMethodSetInterface.class},
                        handler);

        fup.setInt(100);
        fi.voidReturn();
        assertion(fi.intReturn() == 110);

        fup.setInt(200);
        i = 1000;
        o = new Object();
        fi.voidReturn(i, o);
        assertion(fi.intReturn() == 1220);

        fup.setInt(300);
        i = 2000;
        fi.voidReturn(i);
        assertion(fi.intReturn() == 2330);

        o = new Object();
        fup.setObject(o);
        assertion(fi.objectReturn().equals(o));

        i = Integer.MIN_VALUE;
        fup.setInt(i);
        o = new Object();
        fup.setObject(o);
        assertion(fi.objectReturn(o, i).equals(o));

        i = i + 1;
        assertion(fi.objectReturn(i).equals(new Integer(i)));

        i = i + 1;
        fup.setInt(i);
        assertion(fi.intReturn() == i);

        i = i + 1;
        o = new Object();
        assertion(fi.intReturn(i, o) == i);
View Full Code Here

                    "NullPointerException should be thrown");
        } catch (NullPointerException t) {
            // action step 4
        }
        // action step 5
        Remote fup = new MethodSetProxy(logger);
        // action step 6
        Remote result2 = activationExporter.export(fup);

        try {
            Remote result3 = activationExporter.export(fup);
View Full Code Here

    public void run() throws Exception {
        ActivationID aid = new FakeActivationID(logger);
        Exporter exporter = new FakeExporter(logger);
        ActivationExporter activationExporter =
          new ActivationExporter(aid, exporter);
        Remote fup = new MethodSetProxy(logger);
        Remote result = activationExporter.export(fup);
        assertion(result instanceof Proxy);
        assertion(result instanceof RemoteMethodSetInterface);
        InvocationHandler ih = Proxy.getInvocationHandler(result);
        assertion(ih instanceof ActivatableInvocationHandler);
View Full Code Here

        ActivationExporter activationExporter =
                new ActivationExporter(aid, exporter);

        // action step 2
        // action step 3
        Remote fup = new MethodSetProxy(logger);

        // action step 4
        try {
            boolean result2 = activationExporter.unexport(false);
            throw new TestException(
View Full Code Here

    /**
     * This method performs all actions mentioned in class description.
     */
    public void run() throws Exception {
        ActivationID aid = new ActivationID(null);
        MethodSetProxy fp = new MethodSetProxy(logger);
        ActivatableInvocationHandler handler =
                new ActivatableInvocationHandler(aid, fp);
        ActivationID aid2 = handler.getActivationID();

        if (aid2 != aid) {
View Full Code Here

     * This method performs all actions mentioned in class description.
     */
    public void run() throws Exception {
        ActivatableInvocationHandler handler;
        ActivationID aid = new ActivationID(null);
        MethodSetProxy fp = new MethodSetProxy(logger);
        handler = new ActivatableInvocationHandler(aid, fp);
        aid = new ActivationID(null);
        handler = new ActivatableInvocationHandler(aid, null);
        try {
            handler = new ActivatableInvocationHandler(null, null);
View Full Code Here

    public void run() throws Exception {
        ActivationID aid = new FakeActivationID(logger);
        Exporter exporter = new FakeExporter(logger);
        ActivationExporter activationExporter =
          new ActivationExporter(aid, exporter);
        Remote fup = new MethodSetProxy(logger);
        Remote result = activationExporter.export(fup);
        assertion(result instanceof Proxy);
        boolean result2 = activationExporter.unexport(false);
        assertion(result2 == true);
        activationExporter =
View Full Code Here

TOP

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

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.