ucr.core
Class HostCache

java.lang.Object
  extended byucr.core.HostCache

public class HostCache
extends java.lang.Object

A cache of the known hosts on the network


Field Summary
private  java.util.Vector hosts
           
private  int poscount
           
 
Constructor Summary
(package private) HostCache()
          Constructs an empty HostCache
 
Method Summary
 void addHost(Host host)
           
 java.lang.StringBuffer getDumpedHostList()
          returns a string representation of the current connections
 java.util.Enumeration getHosts()
          Get an enumeration of the hosts cached
 java.util.List getKnownHosts()
          Get a list of the Hosts cached
(package private)  Host nextHost()
          Get the next host available - workx in a round-robin fashion
(package private)  int size()
          Query how many hosts are cached
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hosts

private java.util.Vector hosts

poscount

private int poscount
Constructor Detail

HostCache

HostCache()
Constructs an empty HostCache

Method Detail

addHost

public void addHost(Host host)

getKnownHosts

public java.util.List getKnownHosts()
Get a list of the Hosts cached

Returns:
host list

size

int size()
Query how many hosts are cached

Returns:
number of hosts

nextHost

Host nextHost()
Get the next host available - workx in a round-robin fashion

Returns:
host or null if none available

getHosts

public java.util.Enumeration getHosts()
Get an enumeration of the hosts cached


getDumpedHostList

public java.lang.StringBuffer getDumpedHostList()
returns a string representation of the current connections