org.jgroups.stack
Class GossipData

java.lang.Object
  extended by org.jgroups.stack.GossipData
All Implemented Interfaces:
SizeStreamable, Streamable

public class GossipData
extends java.lang.Object
implements SizeStreamable

Encapsulates data sent between GossipRouter and GossipClient

Author:
Bela Ban Oct 4 2001

Constructor Summary
GossipData()
           
GossipData(byte type)
           
GossipData(byte type, java.lang.String group, Address addr)
           
GossipData(byte type, java.lang.String group, Address addr, byte[] buffer)
           
GossipData(byte type, java.lang.String group, Address addr, byte[] buffer, int offset, int length)
           
GossipData(byte type, java.lang.String group, Address addr, java.util.List<Address> mbrs)
           
GossipData(byte type, java.lang.String group, Address addr, java.util.List<Address> mbrs, java.util.List<PhysicalAddress> physical_addrs)
           
GossipData(byte type, java.lang.String group, Address addr, java.lang.String logical_name, java.util.List<PhysicalAddress> phys_addrs)
           
 
Method Summary
 Address getAddress()
           
 byte[] getBuffer()
           
 java.lang.String getGroup()
           
 java.lang.String getLogicalName()
           
 java.util.List<Address> getMembers()
           
 java.util.Collection<PhysicalAddress> getPhysicalAddresses()
           
 byte getType()
           
 void readFrom(java.io.DataInput in)
          Read the state of the current object (including superclasses) from instream Note that the input stream must not be closed
 void setMembers(java.util.List<Address> mbrs)
           
 int size()
          Returns the size (in bytes) of the marshalled object
 java.lang.String toString()
           
 void writeTo(java.io.DataOutput out)
          Write the entire state of the current object (including superclasses) to outstream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GossipData

public GossipData()

GossipData

public GossipData(byte type)

GossipData

public GossipData(byte type,
                  java.lang.String group,
                  Address addr)

GossipData

public GossipData(byte type,
                  java.lang.String group,
                  Address addr,
                  java.util.List<Address> mbrs)

GossipData

public GossipData(byte type,
                  java.lang.String group,
                  Address addr,
                  java.util.List<Address> mbrs,
                  java.util.List<PhysicalAddress> physical_addrs)

GossipData

public GossipData(byte type,
                  java.lang.String group,
                  Address addr,
                  java.lang.String logical_name,
                  java.util.List<PhysicalAddress> phys_addrs)

GossipData

public GossipData(byte type,
                  java.lang.String group,
                  Address addr,
                  byte[] buffer)

GossipData

public GossipData(byte type,
                  java.lang.String group,
                  Address addr,
                  byte[] buffer,
                  int offset,
                  int length)
Method Detail

getType

public byte getType()

getGroup

public java.lang.String getGroup()

getAddress

public Address getAddress()

getLogicalName

public java.lang.String getLogicalName()

getMembers

public java.util.List<Address> getMembers()

getBuffer

public byte[] getBuffer()

getPhysicalAddresses

public java.util.Collection<PhysicalAddress> getPhysicalAddresses()

setMembers

public void setMembers(java.util.List<Address> mbrs)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

writeTo

public void writeTo(java.io.DataOutput out)
             throws java.lang.Exception
Description copied from interface: Streamable
Write the entire state of the current object (including superclasses) to outstream. Note that the output stream must not be closed

Specified by:
writeTo in interface Streamable
Throws:
java.lang.Exception

readFrom

public void readFrom(java.io.DataInput in)
              throws java.lang.Exception
Description copied from interface: Streamable
Read the state of the current object (including superclasses) from instream Note that the input stream must not be closed

Specified by:
readFrom in interface Streamable
Throws:
java.lang.Exception

size

public int size()
Description copied from interface: SizeStreamable
Returns the size (in bytes) of the marshalled object

Specified by:
size in interface SizeStreamable


Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.