JNodeOS v1.1.5 API

edu.utah.janos.route
Class RouteEntry

java.lang.Object
  |
  +--edu.utah.janos.route.RouteEntry

public class RouteEntry
extends java.lang.Object
implements java.lang.Cloneable

A single entry of route table. A route entry contains both the "logical" address and "physical" address of a Node.

A RouteEntry is immutable. That way code can read the table but be trusted to not mess with it. Note that this immutablity depends on Address also being immutable.

XXX rename "logical" to "active" in all names. XXX fixup names of local variables.

Author:
David Wetherall
See Also:
RouteTable

Constructor Summary
RouteEntry(int dst, int nxt, Address addr)
          Create a new RouteEntry for the given destination whose next hop is the given nxt/addr.
RouteEntry(int dst, int nxt, java.lang.String a)
          Create a new RouteEntry for the given destination whose next hop is the given next/addr.
RouteEntry(RouteEntry other)
          Create a new RouteEntry which is a copy of the given RouteEntry.
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object obj)
           
 int getLogicalDest()
           
 int getLogicalNext()
           
 Address getPhysicalNext()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RouteEntry

public RouteEntry(RouteEntry other)
Create a new RouteEntry which is a copy of the given RouteEntry. This creates a shallow copy (both point to the same physical address object).

RouteEntry

public RouteEntry(int dst,
                  int nxt,
                  Address addr)
Create a new RouteEntry for the given destination whose next hop is the given nxt/addr.

XXX 'nxt' is redundant with the addr.getANAddress().

Parameters:
dst - the destination for the route, as an active address
nxt - the next hop for the route, as an active address
addr - the next hop for the route, as a physical address

RouteEntry

public RouteEntry(int dst,
                  int nxt,
                  java.lang.String a)
           throws java.lang.NumberFormatException,
                  AddressFormatException,
                  NoSuchNodeAddress
Create a new RouteEntry for the given destination whose next hop is the given next/addr. The physical address must be a string of the form "host[:port[:transport]]"

XXX port default to 4242 if not provided?

XXX transport defaults to 'udp' if not provided. 'if/ipv4/' is prefixed on transport, regardless. Which is bogus.

XXX why is there string address parsing code here? Why not use the code in Address??

Parameters:
d - destin
Method Detail

getLogicalDest

public final int getLogicalDest()

getLogicalNext

public final int getLogicalNext()

getPhysicalNext

public final Address getPhysicalNext()

clone

public java.lang.Object clone()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

JNodeOS v1.1.5 API

This documentation is Copyright (C) 1998-2001 The University of Utah. All Rights Reserved. See the file LICENSE for distribution terms.
Documentation, software, and mailing list archives for Janos can be found at the Janos Project: http://www.cs.utah.edu/flux/janos/