Project JXTA

net.jxta.impl.endpoint.router
Class BadRoute

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

public class BadRoute
extends Object

This class is used to cache negative route information. Bad routes are represented by three fields: - route advertisement - expiration time of the negative cache - vectors or hops that are known bad for that route


Constructor Summary
BadRoute(RouteAdvertisement route, Long exp, Vector hops)
           
 
Method Summary
 void addHops(Vector hops)
          add bad hops into the bad route
 String display()
           
 Long getExpiration()
          return the bad route expiration time
 Vector getHops()
          return the known bad hops in the route
 RouteAdvertisement getRoute()
          return the bad route info
 void setExpiration(Long exp)
          set the bad route expiration time
 void setHops(Vector hops)
          set bad hops into the bad route
 void setRoute(RouteAdvertisement route)
          set the bad route info
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BadRoute

BadRoute(RouteAdvertisement route,
         Long exp,
         Vector hops)
Method Detail

getRoute

public RouteAdvertisement getRoute()
return the bad route info

Returns:
bad route advertisement

setRoute

public void setRoute(RouteAdvertisement route)
set the bad route info

Parameters:
route - bad route advertisement

getExpiration

public Long getExpiration()
return the bad route expiration time

Returns:
bad route expiration time

setExpiration

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

Parameters:
exp - bad route expiration time

getHops

public Vector getHops()
return the known bad hops in the route

Returns:
bad route hops

setHops

public void setHops(Vector hops)
set bad hops into the bad route

Parameters:
hops - bad route hops

addHops

public void addHops(Vector hops)
add bad hops into the bad route

Parameters:
hops - bad route hops

display

public String display()

JXTA J2SE