Package org.jboss.serial.data

Examples of org.jboss.serial.data.TestProxy


                    //Object obj = objStream.readObject();



                    ObjectInput containerInput = new JBossObjectInputStream(bufStream);
                    TestProxy objRead = (TestProxy)containerInput.readObject();
                    int result = objRead.getProxy().doSomething();

                    BufferedOutputStream bufOut = new BufferedOutputStream(socket.getOutputStream());
                    JBossObjectOutputStream objOut = new JBossObjectOutputStream(bufOut);

                     objOut.writeObject(new Integer(result));
View Full Code Here


    public void testProxy() throws Exception
    {
        ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
        JBossObjectOutputStream objout = new JBossObjectOutputStream(byteOut);

        TestProxy proxy = TestProxy.createTestInstance();

        objout.writeObject(proxy);
        objout.flush();

        JBossObjectInputStream objinput = new JBossObjectInputStream(new ByteArrayInputStream(byteOut.toByteArray()));

        TestProxy newProxy = (TestProxy)objinput.readObject();

        assertEquals(proxy.getProxy().doSomething(),newProxy.getProxy().doSomething());
    }
View Full Code Here

    {

       ObjectOutput output = new JBossObjectOutputStream(socket.getOutputStream());
       ObjectInput input = new JBossObjectInputStream((socket.getInputStream()));

       TestProxy proxy = TestProxy.createTestInstance();
       output.writeObject(proxy);
       output.flush();

       Integer obj = (Integer)input.readObject();

       System.out.println("response: " + obj);

       assertEquals(proxy.getProxy().doSomething(),obj.intValue());



    }
View Full Code Here

    public void testProxy() throws Exception
    {
        ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
        JBossObjectOutputStream objout = new JBossObjectOutputStream(byteOut);

        TestProxy proxy = TestProxy.createTestInstance();

        objout.writeObject(proxy);
        objout.flush();

        JBossObjectInputStream objinput = new JBossObjectInputStream(new ByteArrayInputStream(byteOut.toByteArray()));

        TestProxy newProxy = (TestProxy)objinput.readObject();

        assertEquals(proxy.getProxy().doSomething(),newProxy.getProxy().doSomething());
    }
View Full Code Here

    {

       ObjectOutput output = new JBossObjectOutputStream(socket.getOutputStream());
       ObjectInput input = new JBossObjectInputStream((socket.getInputStream()));

       TestProxy proxy = TestProxy.createTestInstance();
       output.writeObject(proxy);
       output.flush();

       Integer obj = (Integer)input.readObject();

       System.out.println("response: " + obj);

       assertEquals(proxy.getProxy().doSomething(),obj.intValue());



    }
View Full Code Here

                    //Object obj = objStream.readObject();



                    ObjectInput containerInput = new JBossObjectInputStream(bufStream);
                    TestProxy objRead = (TestProxy)containerInput.readObject();
                    int result = objRead.getProxy().doSomething();

                    BufferedOutputStream bufOut = new BufferedOutputStream(socket.getOutputStream());
                    JBossObjectOutputStream objOut = new JBossObjectOutputStream(bufOut);

                     objOut.writeObject(new Integer(result));
View Full Code Here

TOP

Related Classes of org.jboss.serial.data.TestProxy

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.