org.nuxeo.runtime.detection
Class MulticastDetector<T>
java.lang.Object
org.nuxeo.runtime.detection.MulticastDetector<T>
public class MulticastDetector<T>
- extends Object
- Author:
- Bogdan Stefanescu
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
socket
protected MulticastSocket socket
heartBeatTimeout
protected long heartBeatTimeout
groupAddr
protected final InetAddress groupAddr
groupPort
protected final int groupPort
identity
protected String identity
peers
protected final Map<String,Peer<T>> peers
MulticastDetector
public MulticastDetector(String identity,
InetAddress groupAddr,
int groupPort)
throws IOException
- Throws:
IOException
MulticastDetector
public MulticastDetector(String identity)
throws IOException
- Throws:
IOException
MulticastDetector
public MulticastDetector(String identity,
String groupAddr,
int groupPort)
throws IOException
- Throws:
IOException
setDetectionHandler
public void setDetectionHandler(DetectionHandler handler)
getDetectionHandler
public DetectionHandler getDetectionHandler()
getSocket
public MulticastSocket getSocket()
setHeartBeatTimeout
public void setHeartBeatTimeout(long ms)
getHeartBeatTimeout
public long getHeartBeatTimeout()
start
public void start()
stop
public void stop()
getIdentity
public String getIdentity()
- Returns:
- the identity.
getPeers
public Peer<T>[] getPeers()
notifyPeerOnline
protected void notifyPeerOnline(Peer<T> peer)
notifyPeerOffline
protected void notifyPeerOffline(Peer<T> peer)
Copyright ? 2007 Nuxeo SAS. All Rights Reserved.