org.apache.jcs.utils.discovery
Class UDPDiscoverySenderThread

java.lang.Object
  extended by org.apache.jcs.utils.discovery.UDPDiscoverySenderThread
All Implemented Interfaces:
Runnable

public class UDPDiscoverySenderThread
extends Object
implements Runnable

Used to periodically broadcast our location to other caches that might be listening.


Constructor Summary
UDPDiscoverySenderThread(UDPDiscoveryAttributes attributes, ArrayList<String> cacheNames)
          Constructs the sender with the port to tell others to connect to.
 
Method Summary
protected  ArrayList<String> getCacheNames()
           
 void run()
          Send a message.
protected  void setCacheNames(ArrayList<String> cacheNames)
           
protected  void shutdown()
          Issues a remove broadcast to the others.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UDPDiscoverySenderThread

public UDPDiscoverySenderThread(UDPDiscoveryAttributes attributes,
                                ArrayList<String> 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:
attributes - host, port, etc.
cacheNames - List of strings of the names of the region participating.
Method Detail

setCacheNames

protected void setCacheNames(ArrayList<String> cacheNames)
Parameters:
cacheNames - The cacheNames to set.

getCacheNames

protected ArrayList<String> getCacheNames()
Returns:
Returns the cacheNames.

run

public void run()
Send a message.

Specified by:
run in interface Runnable

shutdown

protected void shutdown()
Issues a remove broadcast to the others.



Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.