|
SunSPOT API V6.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.spot.resources.Resource
com.sun.spot.peripheral.radio.mhrp.lqrp.request.RequestTable
public class RequestTable
| 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 |
RequestEntry |
findRequest(long destAddr,
long origAddr,
int reqID,
boolean active)
Helper function to search for an existing (active) entry |
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 |
void |
removeOutstandingRequest(long destination,
long originator,
int reqID)
this method removes an outstanding request from the table |
void |
setOurAddress(long ourAddress)
|
void |
start()
|
void |
stop()
|
| Methods inherited from class com.sun.spot.resources.Resource |
|---|
addTag, getTags, getTagValue, hasTag, removeTag |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void start()
public void stop()
public static RequestTable getInstance()
public static int getNextRREQID()
public boolean addRREQ(RREQ message,
RouteEventClient eventClient,
Object uniqueKey)
message - the rreq that should be addedeventClient - the instance that caused this route requestuniqueKey - identifier for this rreq
public RequestEntry findRequest(long destAddr,
long origAddr,
int reqID,
boolean active)
destAddr - origAddr - reqID - if non-zero then must match request IDactive - if true then only match active requests
public boolean hasActiveRequest(RREQ message)
message -
public boolean hasActiveRequest(RREP message)
message -
public boolean hasRequest(RREQ message)
message -
public boolean hasRequest(RREP message)
message -
public void removeOutstandingRequest(long destination,
long originator,
int reqID)
destination - originator - public void cleanTable()
public RouteEventClient getCallback(RREP message)
message -
public void setOurAddress(long ourAddress)
|
SunSPOT API V6.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||