org.jgroups.protocols
Class OMOLSRHeader

java.lang.Object
  extended by org.jgroups.Header
      extended by org.jgroups.protocols.OMOLSRHeader
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class OMOLSRHeader
extends org.jgroups.Header

Header for unicast messages sent in OMOLSR:

Author:
Marcel Arrufat Arias
See Also:
Serialized Form

Field Summary
static byte CONTROL
           
static byte DATA
           
 org.jgroups.stack.IpAddress groupId
           
 org.jgroups.stack.IpAddress srcAddress
           
 byte type
           
 
Fields inherited from class org.jgroups.Header
HDR_OVERHEAD
 
Constructor Summary
OMOLSRHeader()
           
 
Method Summary
 HashMapSet<OLSRNode,OLSRNode> getForwardingTable()
          Gets the list of all nodes that must receive the packet (from all nodes)
 java.util.HashSet<OLSRNode> getForwardingTableEntry(OLSRNode node)
          Gets the list of all nodes that must receive the packet (from one node)
 org.jgroups.Address getSrcAddress()
           
 void readExternal(java.io.ObjectInput in)
           
 void setForwardingTable(HashMapSet<OLSRNode,OLSRNode> forwardingTable)
          Sets the list of all nodes that must receive the packet
 void setGroupId(org.jgroups.Address groupId)
           
 void setSrcAddress(org.jgroups.Address srcAddress)
           
 void setType(byte type)
           
 java.lang.String toString()
           
static java.lang.String type2Str(byte t)
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class org.jgroups.Header
size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DATA

public static final byte DATA
See Also:
Constant Field Values

CONTROL

public static final byte CONTROL
See Also:
Constant Field Values

type

public byte type

groupId

public org.jgroups.stack.IpAddress groupId

srcAddress

public org.jgroups.stack.IpAddress srcAddress
Constructor Detail

OMOLSRHeader

public OMOLSRHeader()
Parameters:
type -
Method Detail

type2Str

public static java.lang.String type2Str(byte t)

getForwardingTable

public HashMapSet<OLSRNode,OLSRNode> getForwardingTable()
Gets the list of all nodes that must receive the packet (from all nodes)

Returns:
list

getForwardingTableEntry

public java.util.HashSet<OLSRNode> getForwardingTableEntry(OLSRNode node)
Gets the list of all nodes that must receive the packet (from one node)

Parameters:
node -
Returns:

getSrcAddress

public org.jgroups.Address getSrcAddress()
Returns:
Returns the srcAddress.

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException

setForwardingTable

public void setForwardingTable(HashMapSet<OLSRNode,OLSRNode> forwardingTable)
Sets the list of all nodes that must receive the packet

Parameters:
list -

setGroupId

public void setGroupId(org.jgroups.Address groupId)
Parameters:
groupId - the groupId to set

setSrcAddress

public void setSrcAddress(org.jgroups.Address srcAddress)
Parameters:
srcAddress - The srcAddress to set.

setType

public void setType(byte type)

toString

public java.lang.String toString()
Overrides:
toString in class org.jgroups.Header

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Throws:
java.io.IOException