jist.swans.route
Class RouteDsrMsg.OptionAck

java.lang.Object
  extended by jist.swans.route.RouteDsrMsg.Option
      extended by jist.swans.route.RouteDsrMsg.OptionAck
Enclosing class:
RouteDsrMsg

public static class RouteDsrMsg.OptionAck
extends RouteDsrMsg.Option

An Acknowledgement option.


Field Summary
 
Fields inherited from class jist.swans.route.RouteDsrMsg.Option
optBuf, optBufOffset
 
Constructor Summary
RouteDsrMsg.OptionAck(byte[] buf, int offset)
          
 
Method Summary
static byte[] create(short id, NetAddress src, NetAddress dest)
          Creates a new Acknowledgement option.
 NetAddress getDestAddress()
          Returns the destination of the Acknowledgement.
 short getId()
          Returns the id number of the Acknowledgement.
 int getSize()
          Returns the size in bytes of this option.
 NetAddress getSourceAddress()
          Returns the source of the Acknowledgement.
 byte getType()
          Returns the DSR type code for this kind of option.
 
Methods inherited from class jist.swans.route.RouteDsrMsg.Option
create, equals, getBytes, getType, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RouteDsrMsg.OptionAck

public RouteDsrMsg.OptionAck(byte[] buf,
                             int offset)

Method Detail

getType

public byte getType()
Returns the DSR type code for this kind of option.

Specified by:
getType in class RouteDsrMsg.Option
Returns:
the DSR type code for this kind of option.

getSize

public int getSize()
Returns the size in bytes of this option.

Specified by:
getSize in class RouteDsrMsg.Option
Returns:
the size in bytes of this option.

getId

public short getId()
Returns the id number of the Acknowledgement.

Returns:
the id number of the Acknowledgement.

getSourceAddress

public NetAddress getSourceAddress()
Returns the source of the Acknowledgement.

Returns:
the source of the Acknowledgement.

getDestAddress

public NetAddress getDestAddress()
Returns the destination of the Acknowledgement.

Returns:
the destination of the Acknowledgement.

create

public static byte[] create(short id,
                            NetAddress src,
                            NetAddress dest)
Creates a new Acknowledgement option.

Parameters:
id - the identification number of the acknowledgement
src - the source address of the acknowledgement
dest - the destination address of the acknowledgement
Returns:
the byte array corresponding to the desired option.