JXTA

net.jxta.impl.endpoint.router
Class BadRoute

java.lang.Object
  extended by net.jxta.impl.endpoint.router.BadRoute

 class BadRoute
extends Object

This class is used to cache negative route information. Bad routes are represented by three fields:


Constructor Summary
BadRoute(RouteAdvertisement route, long exp, Set<PeerID> hops)
           
 
Method Summary
 void addBadHop(PeerID hop)
          add a bad hop into the bad route
 void addBadHops(Set<PeerID> hops)
          add bad hops into the bad route
 Set<PeerID> getBadHops()
          return the known bad hops in the route
 long getExpiration()
          Return the absolute time at which the this entry expires.
 RouteAdvertisement getRoute()
          Return the bad route info
 void setBadHops(Set<PeerID> hops)
          set bad hops into the bad route
 void setExpiration(long exp)
          set the bad route expiration time
 String toString()
          

Implementation useful for debugging.

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BadRoute

BadRoute(RouteAdvertisement route,
         long exp,
         Set<PeerID> hops)
Method Detail

getRoute

public RouteAdvertisement getRoute()
Return the bad route info

Returns:
bad route advertisement

getExpiration

public long getExpiration()
Return the absolute time at which the this entry expires.

Returns:
The absolute time at which the this entry expires.

setExpiration

public void setExpiration(long exp)
set the bad route expiration time

Parameters:
exp - bad route expiration time

getBadHops

public Set<PeerID> getBadHops()
return the known bad hops in the route

Returns:
bad route hops

setBadHops

public void setBadHops(Set<PeerID> hops)
set bad hops into the bad route

Parameters:
hops - bad route hops

addBadHops

public void addBadHops(Set<PeerID> hops)
add bad hops into the bad route

Parameters:
hops - bad route hops

addBadHop

public void addBadHop(PeerID hop)
add a bad hop into the bad route

Parameters:
hop - The bad route hop.

toString

public String toString()

Implementation useful for debugging. Don't depend on the format

Overrides:
toString in class Object

JXSE