All Packages Class Hierarchy This Package Previous Next Index
Interface link.Node
- public interface Node
Interface for a generic node in a network. Nodes connect to
links, and transmit and receive packets on those links to
implement network protocols. Actual node implementations
will generally be found in the network layer, but the interface
is here because of the relationship with links.
-
AddLink(Link)
- Connect this node to a link.
-
PacketArrived(LinkPacket, Link)
- Callback when a packet arrives at the node.
-
RemoveLink(Link)
-
Disconnect this node from a link.
PacketArrived
public abstract void PacketArrived(LinkPacket p,
Link l)
- Callback when a packet arrives at the node. Called by
the links to which this node is connected.
- Parameters:
- p - the packet which arrived
- l - the link on which the packet arrived
- See Also:
- Link
AddLink
public abstract void AddLink(Link l)
- Connect this node to a link. This is called for the convenience
of the node. Packets will arrive as a result of this node being
registered with the link, independant of whether the link is
registered with the node. Clients should, however, avoid such
"half-connections."
- Parameters:
- l - the link being connected
RemoveLink
public abstract void RemoveLink(Link l)
- Disconnect this node from a link. The inverse of AddLink.
- Parameters:
- l - the link being disconnected
All Packages Class Hierarchy This Package Previous Next Index