Nuxeo Enterprise Platform 5.1

org.nuxeo.runtime.detection
Class MulticastDetector<T>

java.lang.Object
  extended by org.nuxeo.runtime.detection.MulticastDetector<T>

public class MulticastDetector<T>
extends Object

Author:
Bogdan Stefanescu

Field Summary
protected  InetAddress groupAddr
           
protected  int groupPort
           
protected  long heartBeatTimeout
           
protected  String identity
           
protected  Map<String,Peer<T>> peers
           
protected  MulticastSocket socket
           
 
Constructor Summary
MulticastDetector(String identity)
           
MulticastDetector(String identity, InetAddress groupAddr, int groupPort)
           
MulticastDetector(String identity, String groupAddr, int groupPort)
           
 
Method Summary
 DetectionHandler getDetectionHandler()
           
 long getHeartBeatTimeout()
           
 String getIdentity()
           
 Peer<T>[] getPeers()
           
 MulticastSocket getSocket()
           
protected  void notifyPeerOffline(Peer<T> peer)
           
protected  void notifyPeerOnline(Peer<T> peer)
           
 void setDetectionHandler(DetectionHandler handler)
           
 void setHeartBeatTimeout(long ms)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

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
Method Detail

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)

Nuxeo Enterprise Platform 5.1

Copyright ? 2007 Nuxeo SAS. All Rights Reserved.