Package org.apache.geronimo.remoting

Examples of org.apache.geronimo.remoting.MarshalledObject


        TransportLoader bean = (TransportLoader) MBeanProxyFactory.getProxy(TransportLoader.class, kernel.getMBeanServer(), asyncTransport);
        connectURI = bean.getClientConnectURI();

        // simulate remote copy of handle
        MarshalledObject mo = new BytesMarshalledObject(RemoteMBeanServerFactory.create(connectURI.getHost(), connectURI.getPort()));
        remoteProxy = (MBeanServer)mo.get();
    }
View Full Code Here


    }

    public void testRequestMessage() throws Exception {
        String text = "Hello World";
       
        MarshalledObject object = client.createMarshalledObject();
        object.set(text);
        Msg msg = client.createMsg();
        msg.pushMarshaledObject(object);
       
        Msg response = client.sendRequest(connectURI,msg);
        Object rc = response.popMarshaledObject().get();
View Full Code Here

    public void testDatagramMessage() throws Exception {

        String text = "Hello World";
       
        MarshalledObject object = client.createMarshalledObject();
        object.set(text);
        Msg msg = client.createMsg();
        msg.pushMarshaledObject(object);
       
        client.sendDatagram(connectURI,msg);       
        assertTrue(mockRouter.datagramCounter.attempt(10000));
View Full Code Here

                 * @see java.lang.Thread#run()
                 */
                public void run() {
                    try {
                        String text = "Hello World";
                        MarshalledObject object = client.createMarshalledObject();
                        object.set(text);
                        Msg msg = client.createMsg();
                        msg.pushMarshaledObject(object);
                               
                        barrier.barrier();
                       
View Full Code Here

        this.remoteURI = remoteURI;
    }

    public InvocationResult invoke(Invocation invocation) throws Throwable {

        MarshalledObject mo = InvocationSupport.getMarshaledValue(invocation);
        // URI remoteURI = InvocationSupport.getRemoteURI(invocation);
        InvocationType type = InvocationSupport.getInvocationType(invocation);
        if (type == null)
            type = InvocationType.REQUEST;

        Msg msg = transportClient.createMsg();
        msg.pushMarshaledObject(mo);
        if (type == InvocationType.REQUEST) {
            msg = transportClient.sendRequest(remoteURI, msg);
            return new SimpleInvocationResult(true, msg.popMarshaledObject());
        } else {
            transportClient.sendDatagram(remoteURI, msg);
            MarshalledObject rcmo = transportClient.createMarshalledObject();
            rcmo.set(null);
            return new SimpleInvocationResult(true, rcmo);
        }
    }
View Full Code Here

        TransportLoader bean = (TransportLoader) MBeanProxyFactory.getProxy(TransportLoader.class, kernel.getMBeanServer(), asyncTransport);
        connectURI = bean.getClientConnectURI();

        // simulate remote copy of handle
        MarshalledObject mo = new BytesMarshalledObject(RemoteMBeanServerFactory.create(connectURI.getHost(), connectURI.getPort()));
        remoteProxy = (MBeanServer)mo.get();
    }
View Full Code Here

        this.remoteURI = remoteURI;
    }

    public InvocationResult invoke(Invocation invocation) throws Throwable {

        MarshalledObject mo = InvocationSupport.getMarshaledValue(invocation);
        // URI remoteURI = InvocationSupport.getRemoteURI(invocation);
        InvocationType type = InvocationSupport.getInvocationType(invocation);
        if (type == null)
            type = InvocationType.REQUEST;

        Msg msg = transportClient.createMsg();
        msg.pushMarshaledObject(mo);
        if (type == InvocationType.REQUEST) {
            msg = transportClient.sendRequest(remoteURI, msg);
            return new SimpleInvocationResult(true, msg.popMarshaledObject());
        } else {
            transportClient.sendDatagram(remoteURI, msg);
            MarshalledObject rcmo = transportClient.createMarshalledObject();
            rcmo.set(null);
            return new SimpleInvocationResult(true, rcmo);
        }
    }
View Full Code Here

    }

    public void testRequestMessage() throws Exception {
        String text = "Hello World";
       
        MarshalledObject object = client.createMarshalledObject();
        object.set(text);
        Msg msg = client.createMsg();
        msg.pushMarshaledObject(object);
       
        Msg response = client.sendRequest(connectURI,msg);
        Object rc = response.popMarshaledObject().get();
View Full Code Here

    public void testDatagramMessage() throws Exception {

        String text = "Hello World";
       
        MarshalledObject object = client.createMarshalledObject();
        object.set(text);
        Msg msg = client.createMsg();
        msg.pushMarshaledObject(object);
       
        client.sendDatagram(connectURI,msg);       
        assertTrue(mockRouter.datagramCounter.attempt(10000));
View Full Code Here

                 * @see java.lang.Thread#run()
                 */
                public void run() {
                    try {
                        String text = "Hello World";
                        MarshalledObject object = client.createMarshalledObject();
                        object.set(text);
                        Msg msg = client.createMsg();
                        msg.pushMarshaledObject(object);
                               
                        barrier.barrier();
                       
View Full Code Here

TOP

Related Classes of org.apache.geronimo.remoting.MarshalledObject

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.