urv.olsr.data
Class OLSRNode

java.lang.Object
  extended by urv.olsr.data.OLSRNode
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, org.jgroups.util.Streamable

public class OLSRNode
extends java.lang.Object
implements java.io.Serializable, org.jgroups.util.Streamable, java.io.Externalizable

Object that represents a node in a network based in OLSR protocol. OLSR does not make any assumption about node addresses, other than that each node is assumed to have a unique IP address.

Author:
Marcel Arrufat Arias, Raul Gracia Tinedo
See Also:
Serialized Form

Constructor Summary
OLSRNode()
           
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object obj)
           
 java.net.InetAddress getAddress()
           
 float getBandwithCoefficient()
           
 long getBwBytesCapacity()
           
 long getBwMessagesCapacity()
           
 org.jgroups.Address getJGroupsAddress()
          Returns a JGroups address with the current InetAddress
 int hashCode()
           
 void readExternal(java.io.ObjectInput in)
           
 void readFrom(java.io.DataInputStream in)
           
 void setBandwithCoefficient(float bandwithCoefficient)
           
 void setBwBytesCapacity(long bwBytesCapacity)
           
 void setBwMessagesCapacity(long bwMessagesCapacity)
           
 void setValue(java.net.InetAddress address)
           
 java.lang.String toString()
           
 void updateBandwidth(OLSRNode updatedNode)
           
 void writeExternal(java.io.ObjectOutput out)
           
 void writeTo(java.io.DataOutputStream out)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OLSRNode

public OLSRNode()
Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getJGroupsAddress

public org.jgroups.Address getJGroupsAddress()
Returns a JGroups address with the current InetAddress

Returns:

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

readExternal

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

readFrom

public void readFrom(java.io.DataInputStream in)
              throws java.io.IOException,
                     java.lang.IllegalAccessException,
                     java.lang.InstantiationException
Specified by:
readFrom in interface org.jgroups.util.Streamable
Throws:
java.io.IOException
java.lang.IllegalAccessException
java.lang.InstantiationException

toString

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

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

writeTo

public void writeTo(java.io.DataOutputStream out)
             throws java.io.IOException
Specified by:
writeTo in interface org.jgroups.util.Streamable
Throws:
java.io.IOException

updateBandwidth

public void updateBandwidth(OLSRNode updatedNode)

getAddress

public java.net.InetAddress getAddress()
Returns:
Returns the address.

getBandwithCoefficient

public float getBandwithCoefficient()

getBwBytesCapacity

public long getBwBytesCapacity()

getBwMessagesCapacity

public long getBwMessagesCapacity()

setBandwithCoefficient

public void setBandwithCoefficient(float bandwithCoefficient)

setBwBytesCapacity

public void setBwBytesCapacity(long bwBytesCapacity)

setBwMessagesCapacity

public void setBwMessagesCapacity(long bwMessagesCapacity)

setValue

public void setValue(java.net.InetAddress address)