SunSPOT API V3.0


com.sun.spot.peripheral.radio.mhrp.aodv.request
Class RequestTable

java.lang.Object
  extended by com.sun.spot.peripheral.radio.mhrp.aodv.request.RequestTable

public class RequestTable
extends Object

Version:
0.1
Author:
Allen Ajit George

Method Summary
 boolean addRREQ(RREQ message, RouteEventClient eventClient, Object uniqueKey)
          add a route request to the request table
 void cleanTable()
          This method removes all outstanding request that are expired
 RouteEventClient getCallback(RREP message)
          This method provides access to the client that interested in the route reply message that is passed as an argument
static RequestTable getInstance()
          provides the instance of this singleton
static int getNextRREQID()
          get the next route request ID
 boolean hasActiveRequest(RREP message)
          this method tells the caller if the request table already has an entry for the destination of this route request and it is currently active
 boolean hasActiveRequest(RREQ message)
          this method tells the caller if the request table already has an entry for the destination of this route request and it is currently active
 boolean hasRequest(RREP message)
          this method tells the caller if the request table already has an entry for the destination of this route reply
 boolean hasRequest(RREQ message)
          this method tells the caller if the request table already has an entry for the destination of this route request
 Object removeOutstandingRequest(long destination, long originator)
          this method an outstanding request from the table
 void setOurAddress(long ourAddress)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static RequestTable getInstance()
provides the instance of this singleton


getNextRREQID

public static int getNextRREQID()
get the next route request ID

Returns:
nextRREQID

addRREQ

public boolean addRREQ(RREQ message,
                       RouteEventClient eventClient,
                       Object uniqueKey)
add a route request to the request table

Parameters:
message - the rreq that should be added
eventClient - the instance that caused this route request
uniqueKey - identifier for this rreq
Returns:
true when ready

hasActiveRequest

public boolean hasActiveRequest(RREQ message)
this method tells the caller if the request table already has an entry for the destination of this route request and it is currently active

Parameters:
message -
Returns:
hasActiveRequest

hasActiveRequest

public boolean hasActiveRequest(RREP message)
this method tells the caller if the request table already has an entry for the destination of this route request and it is currently active

Parameters:
message -
Returns:
hasActiveRequest

hasRequest

public boolean hasRequest(RREQ message)
this method tells the caller if the request table already has an entry for the destination of this route request

Parameters:
message -
Returns:
hasRequest

hasRequest

public boolean hasRequest(RREP message)
this method tells the caller if the request table already has an entry for the destination of this route reply

Parameters:
message -
Returns:
hasRequest

removeOutstandingRequest

public Object removeOutstandingRequest(long destination,
                                       long originator)
this method an outstanding request from the table

Parameters:
destination -
originator -
Returns:
entry is null if there was no entry for this parameters

cleanTable

public void cleanTable()
This method removes all outstanding request that are expired


getCallback

public RouteEventClient getCallback(RREP message)
This method provides access to the client that interested in the route reply message that is passed as an argument

Parameters:
message -
Returns:
routeEventClient

setOurAddress

public void setOurAddress(long ourAddress)

SunSPOT API V3.0


Copyright © 2006, 2007 Sun Microsystems, Inc. All Rights Reserved.