com.kenmccrary.jtella
Class HostCache

java.lang.Object
  |
  +--com.kenmccrary.jtella.HostCache

public class HostCache
extends java.lang.Object

A cache of the known hosts on the network


Method Summary
 void addHost(Host host)
          Adds a host to the cache
 java.util.List getKnownHosts()
          Get a list of the Hosts cached
 void remove(Host host)
          Removes a host from the cache
 void removeHost(Host host)
          Remove a host from the cache, probably because its not responding
 void removeHost(java.lang.String ipAddress, int port)
          Removes a host from the cache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addHost

public void addHost(Host host)
Adds a host to the cache
Parameters:
ipAddress - internet address
port - port

removeHost

public void removeHost(java.lang.String ipAddress,
                       int port)
Removes a host from the cache
Parameters:
ipAddress - address of host to remove
port - port of host to remove

remove

public void remove(Host host)
Removes a host from the cache
Parameters:
host - host to remove

getKnownHosts

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

removeHost

public void removeHost(Host host)
Remove a host from the cache, probably because its not responding