Package org.jgroups.stack

Examples of org.jgroups.stack.LogicalAddress


    }


    public void setUp() throws Exception {
        super.setUp();
        a=new LogicalAddress("host1", null);
        b=new LogicalAddress("host1", null);
        c=(LogicalAddress)a.clone();
    }
View Full Code Here


        ByteArrayOutputStream bos=new ByteArrayOutputStream();
        ObjectOutputStream oos=new ObjectOutputStream(bos);
        byte[] buf=null;
        ByteArrayInputStream bis=null;
        ObjectInputStream ois;
        LogicalAddress a2, b2;

        a.setAdditionalData(null);
        b.setAdditionalData("Bela Ban".getBytes());
        oos.writeObject(a);
        oos.writeObject(b);


        buf=bos.toByteArray();
        bis=new ByteArrayInputStream(buf);
        ois=new ObjectInputStream(bis);
        a2=(LogicalAddress)ois.readObject();
        b2=(LogicalAddress)ois.readObject();

        assertTrue(a.equals(a2));
        assertTrue(b.equals(b2));

        assertTrue(a2.getAdditionalData() == null);
        assertTrue("Bela Ban".equals(new String(b2.getAdditionalData())));
    }
View Full Code Here

        ByteArrayOutputStream bos=new ByteArrayOutputStream();
        ObjectOutputStream oos=new ObjectOutputStream(bos);
        byte[] buf=null;
        ByteArrayInputStream bis=null;
        ObjectInputStream ois;
        LogicalAddress a2, b2, c2;

        oos.writeObject(a);
        oos.writeObject(b);
        oos.writeObject(c);
View Full Code Here

TOP

Related Classes of org.jgroups.stack.LogicalAddress

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.