|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.objectweb.tribe.gms.discovery.UdpDiscoveryService
This class defines a UdpDiscoveryService.
GroupDiscoveryMessage
are sent on the given multicast address.
All registered listeners are called when a GroupDiscoveryMessage is received.
Field Summary |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
UdpDiscoveryService(IpAddress multicastAddress,
IpAddress replyAddress)
Creates a new UdpDiscoveryService object |
Method Summary | |
IpAddress |
getReplyAddress()
Returns the replyAddress value. |
void |
kill()
Terminate the UdpDiscoveryService. |
void |
registerDiscoveryListener(DiscoveryListener listener)
Register a new DiscoveryListener. |
void |
run()
The DiscoveryService threads looks for JOIN messages and notify appropriate listeners. |
void |
sendGroupDiscovery(GroupIdentifier gid)
Discover a group based on its identifier. |
void |
setReplyAddress(IpAddress replyAddress)
Sets the replyAddress value. |
boolean |
unregisterDiscoveryListener(DiscoveryListener listener)
Unregister a DiscoveryListener. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public UdpDiscoveryService(IpAddress multicastAddress, IpAddress replyAddress)
UdpDiscoveryService
object
multicastAddress
- multicast address to use for discovery messages.Method Detail |
public void sendGroupDiscovery(GroupIdentifier gid)
DiscoveryService
sendGroupDiscovery
in interface DiscoveryService
gid
- group identifierDiscoveryService.sendGroupDiscovery(org.objectweb.tribe.common.GroupIdentifier)
public void registerDiscoveryListener(DiscoveryListener listener)
DiscoveryService
registerDiscoveryListener
in interface DiscoveryService
listener
- the listener to addDiscoveryService.registerDiscoveryListener(org.objectweb.tribe.gms.discovery.DiscoveryListener)
public boolean unregisterDiscoveryListener(DiscoveryListener listener)
DiscoveryService
unregisterDiscoveryListener
in interface DiscoveryService
listener
- the listener to remove
DiscoveryService.unregisterDiscoveryListener(org.objectweb.tribe.gms.discovery.DiscoveryListener)
public void run()
run
in interface java.lang.Runnable
public IpAddress getReplyAddress()
public void setReplyAddress(IpAddress replyAddress)
replyAddress
- The replyAddress to set.public void kill()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |