|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.javagroups.stack.GossipClient
Local stub for clients to access one (or more) GossipServers. Will use proprietary protocol (using GossipData PDUs) based on TCP to connect to GossipServer.
Requires JDK >= 1.3 due to the use of Timer
todo: make access to multiple GossipServer concurrent (1 thread/GossipServer)
Constructor Summary | |
---|---|
GossipClient(IpAddress gossip_host,
long expiry)
Creates the GossipClient |
|
GossipClient(java.util.Vector gossip_hosts,
long expiry)
Creates the GossipClient |
Method Summary | |
---|---|
void |
addGossipServer(IpAddress gossip_host)
Adds a GossipServer to be accessed. |
java.util.Vector |
getMembers(java.lang.String group)
Returns all members of a given group |
static void |
main(java.lang.String[] args)
|
void |
register(java.lang.String group,
Address mbr)
Adds the member to the given group. |
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GossipClient(IpAddress gossip_host, long expiry)
gossip_host
- The address and port of the host on which the GossipServer is runningexpiry
- Interval (in msecs) for the refresher taskpublic GossipClient(java.util.Vector gossip_hosts, long expiry)
gossip_hosts
- List of IpAddressesexpiry
- Interval (in msecs) for the refresher taskMethod Detail |
public void stop()
public void addGossipServer(IpAddress gossip_host)
public void register(java.lang.String group, Address mbr)
The entry will be registered with all GossipServers that GossipClient is configured to access
public java.util.Vector getMembers(java.lang.String group)
group
- The group name
public static void main(java.lang.String[] args)
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |