org.inria.myriads.snoozenode.heartbeat
Class HeartbeatFactory

java.lang.Object
  extended by org.inria.myriads.snoozenode.heartbeat.HeartbeatFactory

public final class HeartbeatFactory
extends Object

Heartbeat factory.

Author:
Eugen Feller

Method Summary
static GroupLeaderDiscovery newGroupLeaderDiscovery(org.inria.myriads.snoozecommon.communication.NetworkAddress heartbeatAddress, int timeout, LocalControllerBackend localControllerBackend)
          Creates a new group leader discovery.
static GroupManagerHeartbeatHandler newGroupManagerHeartbeatHandler(org.inria.myriads.snoozecommon.communication.NetworkAddress heartbeatAddress, int timeout, LocalControllerBackend backend)
          Creates a new group manager heartbeat handler.
static HeartbeatMulticastReceiver newHeartbeatMulticastListener(org.inria.myriads.snoozecommon.communication.NetworkAddress heartbeatAddress, int timeout, HeartbeatListener heartbeatEvent)
          Creates a new heartbeat multicast listener.
static HeartbeatMulticastSender newHeartbeatMulticastSender(org.inria.myriads.snoozecommon.communication.NetworkAddress heartbeatAddress, int interval, HeartbeatMessage heartbeatMessage)
          Creates a new heartbeat multicast sender.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newGroupLeaderDiscovery

public static GroupLeaderDiscovery newGroupLeaderDiscovery(org.inria.myriads.snoozecommon.communication.NetworkAddress heartbeatAddress,
                                                           int timeout,
                                                           LocalControllerBackend localControllerBackend)
                                                    throws Exception
Creates a new group leader discovery.

Parameters:
heartbeatAddress - The heartbeat address
timeout - The time out
localControllerBackend - The local controller backend
Returns:
The group leader discovery object
Throws:
Exception - The exception

newGroupManagerHeartbeatHandler

public static GroupManagerHeartbeatHandler newGroupManagerHeartbeatHandler(org.inria.myriads.snoozecommon.communication.NetworkAddress heartbeatAddress,
                                                                           int timeout,
                                                                           LocalControllerBackend backend)
                                                                    throws Exception
Creates a new group manager heartbeat handler.

Parameters:
heartbeatAddress - The heartbeat address
timeout - The timeout
backend - The local controller backend
Returns:
The group manager heartbeat handler
Throws:
Exception - The exception

newHeartbeatMulticastListener

public static HeartbeatMulticastReceiver newHeartbeatMulticastListener(org.inria.myriads.snoozecommon.communication.NetworkAddress heartbeatAddress,
                                                                       int timeout,
                                                                       HeartbeatListener heartbeatEvent)
                                                                throws Exception
Creates a new heartbeat multicast listener.

Parameters:
heartbeatAddress - The heartbeat address
timeout - The timeout
heartbeatEvent - The heartbeat event
Returns:
The heartbeat multicast listener
Throws:
Exception - The exception

newHeartbeatMulticastSender

public static HeartbeatMulticastSender newHeartbeatMulticastSender(org.inria.myriads.snoozecommon.communication.NetworkAddress heartbeatAddress,
                                                                   int interval,
                                                                   HeartbeatMessage heartbeatMessage)
                                                            throws SocketException
Creates a new heartbeat multicast sender.

Parameters:
heartbeatAddress - The heartbeat address
interval - The interval
heartbeatMessage - The heartbeat messsage
Returns:
The heartbeat multicast sender
Throws:
SocketException


Copyright © 2012. All Rights Reserved.