org.apache.jcs.auxiliary.lateral.socket.tcp.discovery
Class UDPDiscoverySenderThread
java.lang.Object
org.apache.jcs.auxiliary.lateral.socket.tcp.discovery.UDPDiscoverySenderThread
- All Implemented Interfaces:
- java.lang.Runnable
public class UDPDiscoverySenderThread
- extends java.lang.Object
- implements java.lang.Runnable
Used to periodically broadcast our location to other caches that might be
listening.
- Author:
- Aaron Smuts
|
Constructor Summary |
UDPDiscoverySenderThread(java.lang.String discoveryAddress,
int discoveryPort,
java.lang.String myHostName,
int myPort,
java.util.ArrayList cacheNames)
Constructs the sender with the port to tell others to connect to. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UDPDiscoverySenderThread
public UDPDiscoverySenderThread(java.lang.String discoveryAddress,
int discoveryPort,
java.lang.String myHostName,
int myPort,
java.util.ArrayList cacheNames)
- Constructs the sender with the port to tell others to connect to.
On construction the sender will request that the other caches let it know
their addresses.
- Parameters:
discoveryAddress - host to broadcast todiscoveryPort - port to broadcast tomyHostName - host name we can be found atmyPort - port we are listening oncacheNames - List of strings of the names of the regiond participating.
setCacheNames
protected void setCacheNames(java.util.ArrayList cacheNames)
- Parameters:
cacheNames - The cacheNames to set.
getCacheNames
protected java.util.ArrayList getCacheNames()
- Returns:
- Returns the cacheNames.
run
public void run()
- Specified by:
run in interface java.lang.Runnable
Copyright © 2002-2007 Apache Software Foundation. All Rights Reserved.