CarobNS::SocketKillerCallback Class Reference

Implementation of ControllerStateChangedCallback targeted for driver pings to controllers. More...

#include <ControllerStateChangedCallback.hpp>

Inheritance diagram for CarobNS::SocketKillerCallback:

CarobNS::ControllerStateChangedCallback List of all members.

Public Member Functions

 SocketKillerCallback (AbstractControllerPool &p)
 Policy is needed to inform about controller status changes.
 ~SocketKillerCallback ()
 Clears constrollers and socket lists.
void onControllerDown (const ControllerInfo &ctrl)
 Kills sockets associated to the given controller.
void onControllerUp (const ControllerInfo &ctrl)
 Just informs policy that a controller came back.
void registerSocket (const ControllerInfo &ctrl, JavaSocket *socketFd)
 Adds the given socket to the list of monitored sockets for given controller.
void unRegisterSocket (const ControllerInfo &ctrl, JavaSocket *socket)
 Removes the given socket from the list of monitored sockets for a given controller.

Detailed Description

Implementation of ControllerStateChangedCallback targeted for driver pings to controllers.


Holds lists of socket file descriptors associated to a controller. Upon controller failure detection, this list of sockets will be killed to allow driver failover


Member Function Documentation

void CarobNS::SocketKillerCallback::unRegisterSocket ( const ControllerInfo ctrl,
JavaSocket socket 
)

Removes the given socket from the list of monitored sockets for a given controller.

This function should be called when socket creation or connection failed

Parameters:
ctrl controller to which given socket was connected
socket the socket to un register


The documentation for this class was generated from the following file:
Generated on Fri Mar 9 17:40:20 2007 for Carob by  doxygen 1.4.7