SunSPOT API V3.0


com.sun.spot.peripheral.radio.routing
Class RoutingPolicyManager

java.lang.Object
  extended by com.sun.spot.peripheral.radio.routing.RoutingPolicyManager
All Implemented Interfaces:
IRoutingPolicyManager

public class RoutingPolicyManager
extends Object
implements IRoutingPolicyManager

The onject that oversees the routing policy for this node

Author:
pete

Method Summary
 boolean bridgeBroadcasts()
          return true if we pass broadcasts without decrementing hop count
static IRoutingPolicyManager getInstance()
          Return a singleton for the RoutingPolicyManager
 boolean isEndNode()
          determine if we are only a routing consumer
 boolean maySleep()
          determine whether this routing policy allows deepSleep
 void policyHasChanged(RoutingPolicy newPolicy)
          Notify the routing subsystem of a new routing policy
 boolean routeAlways()
          determine if we always pass packets
 String toString()
          create a string representation of this object
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getInstance

public static IRoutingPolicyManager getInstance()
Return a singleton for the RoutingPolicyManager

Returns:
the singleton that manages routing policy

policyHasChanged

public void policyHasChanged(RoutingPolicy newPolicy)
Notify the routing subsystem of a new routing policy

Specified by:
policyHasChanged in interface IRoutingPolicyManager
Parameters:
newPolicy - policy that should now be in effect

toString

public String toString()
create a string representation of this object

Overrides:
toString in class Object
Returns:
the routing policy as a string description

maySleep

public boolean maySleep()
determine whether this routing policy allows deepSleep

Specified by:
maySleep in interface IRoutingPolicyManager
Returns:
true if the deepSleep is not disabled

routeAlways

public boolean routeAlways()
determine if we always pass packets

Specified by:
routeAlways in interface IRoutingPolicyManager
Returns:
true if we pass packets for other nodes

isEndNode

public boolean isEndNode()
determine if we are only a routing consumer

Specified by:
isEndNode in interface IRoutingPolicyManager
Returns:
true if we only generate routing requests for ourself

bridgeBroadcasts

public boolean bridgeBroadcasts()
Description copied from interface: IRoutingPolicyManager
return true if we pass broadcasts without decrementing hop count

Specified by:
bridgeBroadcasts in interface IRoutingPolicyManager
Returns:
true if we pass broadcasts without decrementing hop count

SunSPOT API V3.0


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