public abstract class IGMPGroup
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
auxInfo |
protected IpAddress |
gaddr |
protected java.util.List<IpAddress> |
sources |
| Constructor and Description |
|---|
IGMPGroup() |
IGMPGroup(IpAddress gaddr,
int auxInfo)
Initialize this object with a multicast group address and additional info.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSource(IpAddress saddr)
Add a unicast source address to this message.
|
abstract IGMPGroup |
deserialize(java.nio.ByteBuffer bb)
Deserialize an IGMPQuery or IGMPMembership message.
|
int |
getAuxInfo()
Get the auxillary info.
|
IpAddress |
getGaddr()
Get the multicast group address.
|
java.util.List<IpAddress> |
getSources()
Return the list of source addresses.
|
abstract byte[] |
serialize(java.nio.ByteBuffer bb)
Serialize the IGMPGroup subclass.
|
java.lang.String |
toString() |
protected int auxInfo
protected IpAddress gaddr
protected java.util.List<IpAddress> sources
public IGMPGroup()
public IGMPGroup(IpAddress gaddr, int auxInfo)
gaddr - the multicast group address for this message type.auxInfo - additional info potentially used by IGMPQuerypublic IpAddress getGaddr()
public int getAuxInfo()
public void addSource(IpAddress saddr)
saddr - IPv4 unicast source addresspublic java.util.List<IpAddress> getSources()
public abstract IGMPGroup deserialize(java.nio.ByteBuffer bb) throws DeserializationException
bb - the ByteBuffer wrapping the serialized message. The position of the
ByteBuffer should be pointing at the head of either message type.DeserializationException - in case deserialization goes wrongpublic abstract byte[] serialize(java.nio.ByteBuffer bb)
bb - the ByteBuffer to write into, positioned at the next spot to be written to.public java.lang.String toString()
toString in class java.lang.Object