Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | File Members

Notification Class Reference

#include <Notification.h>

List of all members.

Public Member Functions

 Notification ()
 Notification (const std::string host, const u_int16_t port)
 Notification (const std::string notifId)
 ~Notification ()
std::string getNotifId () const
time_t getValid () const
int getFd () const
void addJob (const glite::wmsutils::jobid::JobId &jobId)
void removeJob (const glite::wmsutils::jobid::JobId &jobId)
std::string getJobs ()
void setStates (const std::vector< glite::lb::JobStatus::Code > &)
std::string getStates ()
void Register ()
void Bind (const std::string address)
int receive (glite::lb::JobStatus &, timeval &)


Detailed Description

Manage LB notifications. Simplified API, covers only a subset of C API functinality


Constructor & Destructor Documentation

Notification::Notification  ) 
 

Create an empty object to be used for new notifications, i.e. with Register()

Notification::Notification const std::string  host,
const u_int16_t  port
 

Create from server host,port pair to be used for new notifications, i.e. with Register()

Parameters:
in] host host
in] port port

Notification::Notification const std::string  notifId  ) 
 

Create from NotifId to be used for existing notifications, i.e. with Bind()

Parameters:
in] notifId NotifId

Notification::~Notification  ) 
 


Member Function Documentation

void Notification::addJob const glite::wmsutils::jobid::JobId &  jobId  ) 
 

Add this job to the list. Local operation only, Register() has to be called to propagate changes to server

Parameters:
in] jobId JobId

void Notification::Bind const std::string  address  ) 
 

Bind to the existing notification at the server i.e. change the receiving local address

Parameters:
in] address address override

int Notification::getFd  )  const
 

retrieve local listener filedescriptor

std::string Notification::getJobs  ) 
 

Get jobs on the list

std::string Notification::getNotifId  )  const
 

retrieve NotifId

std::string Notification::getStates  ) 
 

Get states

time_t Notification::getValid  )  const
 

retrieve time until when it is valid

int Notification::receive glite::lb::JobStatus &  ,
timeval & 
 

Receive notification. Blocks at most the specified timeout (maybe 0 for local polling).

Return values:
0 OK
1 timeout

void Notification::Register  ) 
 

Register (or re-register, i.e. change and extend) with the server

void Notification::removeJob const glite::wmsutils::jobid::JobId &  jobId  ) 
 

Remove job from the list, local op again.

Parameters:
in] jobId JobId

void Notification::setStates const std::vector< glite::lb::JobStatus::Code > &   ) 
 

Receive notifications on these states


The documentation for this class was generated from the following file:
Generated on Wed Jun 27 13:43:06 2007 for Glite LB Client: CPP - Interface by doxygen 1.3.5