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

Job Class Reference

#include <Job.h>

List of all members.

Public Member Functions

 Job (void)
 Job (const glite::wmsutils::jobid::JobId &jobid)
 ~Job ()
Joboperator= (const glite::wmsutils::jobid::JobId &jobid)
JobStatus status (int flags) const
void log (std::vector< Event > &events) const
const std::vector< Eventlog (void) const
const std::pair< std::string,
uint16_t > 
queryListener (const std::string &name) const
void setParam (edg_wll_ContextParam ctx, int val)
void setParam (edg_wll_ContextParam ctx, const std::string val)
void setParam (edg_wll_ContextParam ctx, const struct timeval &val)
int getParamInt (edg_wll_ContextParam ctx) const
std::string getParamString (edg_wll_ContextParam ctx) const
timeval getParamTime (edg_wll_ContextParam ctx) const

Static Public Attributes

const int STAT_CLASSADS
const int STAT_CHILDREN
const int STAT_CHILDSTAT


Detailed Description

Class encapsulating the job info stored in the L&B database.

This class is the primary interface for getting information about jobs stored in the L&B database. It is constructed from known job id, which uniquely identifies the job as well as the bookkeeping server where the job data is stored. The Job class provides methods for obtaining the data from the bookkeeping server and for setting various parameters of the connection to the bookkeeping server.

All query methods have their counterpart in C functions taking taking edg_wll_Context and edg_wll_JobId as their first parameters (in fact, those functions are used to do the actual work).


Constructor & Destructor Documentation

Job::Job void   ) 
 

Default constructor.

Initializes the job as empty, not representing anything.

Job::Job const glite::wmsutils::jobid::JobId &  jobid  ) 
 

Constructor from job id.

Initializes the job to obtain information for the given job id.

Parameters:
in] jobid The job id of the job this object will represent.
Exceptions:
Exception Could not copy the job id.

Job::~Job  ) 
 

Destructor.

All the actual work is done by member destructors, namely ServerConnection.


Member Function Documentation

int Job::getParamInt edg_wll_ContextParam  ctx  )  const
 

Get LB parameters.

Obtain value of the named integer parameter.

Parameters:
in] ctx Symbolic name of the paramater to obtain.
Returns:
Value of the parameter.

std::string Job::getParamString edg_wll_ContextParam  ctx  )  const
 

Get LB parameters.

Obtain value of the named string parameter.

Parameters:
in] ctx Symbolic name of the paramater to obtain.
Returns:
Value of the parameter.

struct timeval Job::getParamTime edg_wll_ContextParam  ctx  )  const
 

Get LB parameters.

Obtain value of the named timeval parameter.

Parameters:
in] ctx Symbolic name of the paramater to obtain.
Returns:
Value of the parameter.

const std::vector<Event> Job::log void   )  const
 

Return all events corresponding to this job

Obtain all events corresponding to the job that are stored in the bookkeeping server database. The maximum number of returned events can be set by calling setParam().

Returns:
Vector of events (of type Event).
Exceptions:
Exception Could not query the server.

void Job::log std::vector< Event > &  events  )  const
 

Return all events corresponding to this job

Obtain all events corresponding to the job that are stored in the bookkeeping server database. The maximum number of returned events can be set by calling setParam().

Parameters:
out] events Vector of events (of type Event).
Exceptions:
Exception Could not query the server.

Job& Job::operator= const glite::wmsutils::jobid::JobId &  jobid  ) 
 

Assign new job id to an existing instance.

Redirect this instance to obtain information about different job; connection to the server is preserved, if possible.

Parameters:
in] jobid New job id.
Returns:
Reference to this object.
Exceptions:
Exception Could not copy the job id.

const std::pair<std::string,uint16_t> Job::queryListener const std::string &  name  )  const
 

Return last known address of a listener associated to the job.

Obtains the information about last listener that has been registered for this job in the bookkeeping server database.

Parameters:
in] name Name of the listener.
Returns:
Hostname and port number of the registered listener.
Exceptions:
Exception Could not query the server.

void Job::setParam edg_wll_ContextParam  ctx,
const struct timeval &  val
 

Manipulate LB parameters.

This method sets timeval typed parameters for the server connection.

Parameters:
in] ctx Symbolic name of the parameter to change.
in] val New value of the parameter.

void Job::setParam edg_wll_ContextParam  ctx,
const std::string  val
 

Manipulate LB parameters.

This method sets string typed parameters for the server connection.

Parameters:
in] ctx Symbolic name of the parameter to change.
in] val New value of the parameter.

void Job::setParam edg_wll_ContextParam  ctx,
int  val
 

Manipulate LB parameters.

This method sets integer typed parameters for the server connection.

Parameters:
in] ctx Symbolic name of the parameter to change.
in] val New value of the parameter.

JobStatus Job::status int  flags  )  const
 

Return job status.

Obtain the job status (as JobStatus) from the bookkeeping server.

Parameters:
in] flags Specify details of the query.
Returns:
Status of the job.
Exceptions:
Exception Could not query the server.
See also:
STAT_CLASSADS, STAT_CHILDREN, STAT_CHILDSTAT


Member Data Documentation

const int Job::STAT_CHILDREN [static]
 

Include the list of subjob id's in the query result.

const int Job::STAT_CHILDSTAT [static]
 

Apply the flags recursively to subjobs.

const int Job::STAT_CLASSADS [static]
 

Include the job description in the query result.


The documentation for this class was generated from the following file:
Generated on Thu May 11 20:44:16 2006 for Glite LB Client: CPP - Interface by doxygen 1.3.5