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

ServerConnection Class Reference

#include <ServerConnection.h>

List of all members.

Public Member Functions

 ServerConnection (void)
 ServerConnection (const std::string &)
void open (const std::string &)
void close (void)
void setQueryServer (const std::string &host, int port)
void setQueryTimeout (int time)
void setX509Proxy (const std::string &proxy)
void setX509Cert (const std::string &cert, const std::string &key)
std::pair< std::string, int > getQueryServer () const
int getQueryTimeout () const
std::string getX509Proxy () const
std::pair< std::string, std::string > getX509Cert () const
virtual ~ServerConnection ()
std::vector< std::vector<
std::pair< QueryRecord::Attr,
std::string > > > 
getIndexedAttrs (void)
void setQueryJobsLimit (int max)
void setQueryEventsLimit (int max)
void queryEvents (const std::vector< QueryRecord > &job_cond, const std::vector< QueryRecord > &event_cond, std::vector< Event > &events) const
const std::vector< EventqueryEvents (const std::vector< QueryRecord > &job_cond, const std::vector< QueryRecord > &event_cond) const
const std::list< EventqueryEventsList (const std::vector< QueryRecord > &job_cond, const std::vector< QueryRecord > &event_cond) const
std::string queryEventsAggregate (const std::vector< QueryRecord > &job_cond, const std::vector< QueryRecord > &event_cond, enum AggOp const op, std::string const attr) const
void queryEvents (const std::vector< std::vector< QueryRecord > > &job_cond, const std::vector< std::vector< QueryRecord > > &event_cond, std::vector< Event > &eventList) const
const std::vector< EventqueryEvents (const std::vector< std::vector< QueryRecord > > &job_cond, const std::vector< std::vector< QueryRecord > > &event_cond) const
void queryJobs (const std::vector< QueryRecord > &query, std::vector< glite::wmsutils::jobid::JobId > &jobList) const
const std::vector< glite::wmsutils::jobid::JobId > queryJobs (const std::vector< QueryRecord > &query) const
void queryJobs (const std::vector< std::vector< QueryRecord > > &query, std::vector< glite::wmsutils::jobid::JobId > &jobList) const
const std::vector< glite::wmsutils::jobid::JobId > queryJobs (const std::vector< std::vector< QueryRecord > > &query) const
void queryJobStates (const std::vector< QueryRecord > &query, int flags, std::vector< JobStatus > &states) const
const std::vector< JobStatusqueryJobStates (const std::vector< QueryRecord > &query, int flags) const
const std::list< JobStatusqueryJobStatesList (const std::vector< QueryRecord > &query, int flags) const
void queryJobStates (const std::vector< std::vector< QueryRecord > > &query, int flags, std::vector< JobStatus > &states) const
const std::vector< JobStatusqueryJobStates (const std::vector< std::vector< QueryRecord > > &query, int flags) const
void userJobStates (std::vector< JobStatus > &stateList) const
const std::vector< JobStatususerJobStates () const
void userJobs (std::vector< glite::wmsutils::jobid::JobId > &jobs) const
const std::vector< glite::wmsutils::jobid::JobId > userJobs () const
void setParam (edg_wll_ContextParam name, int value)
void setParam (edg_wll_ContextParam name, const std::string &value)
void setParam (edg_wll_ContextParam name, const struct timeval &value)
int getParamInt (edg_wll_ContextParam name) const
std::string getParamString (edg_wll_ContextParam name) const
timeval getParamTime (edg_wll_ContextParam name) const

Protected Member Functions

edg_wll_Context getContext (void) const

Friends

class Job


Detailed Description

Class representing a connection to the L&B server.

This class serves as an interface for queries not related to particular job. The address of the bookkeeping server to query can be set arbitrarily during the lifetime of this object, connection to the server is maintained automatically by the underlying C API layer. This class can be thought of also as an encapsulation of edg_wll_Context from L&B C API.

ServerConnection's methods correlate to the L&B C API functions taking edg_wll_Context as their first argument and not having edg_wll_JobId as the second argument.

See also:
edg_wll_Context


Constructor & Destructor Documentation

ServerConnection::ServerConnection void   ) 
 

Default constructor.

Initializes the context to default values.

Exceptions:
OSException Initialization failed.

ServerConnection::ServerConnection const std::string &   ) 
 

DEPRECATED.

Exceptions:
Exception Always.

virtual ServerConnection::~ServerConnection  )  [virtual]
 

Destructor.

Closes the connections and frees the context.


Member Function Documentation

void ServerConnection::close void   ) 
 

DEPRECATED.

Exceptions:
Exception Always.

edg_wll_Context ServerConnection::getContext void   )  const [protected]
 

int ServerConnection::getParamInt edg_wll_ContextParam  name  )  const
 

Get communication parameters of integer type.

Gets the named parameter of integer type.

Parameters:
in] name Symbolic name of the parameter.
Exceptions:
LoggingException Getting parameter failed.
See also:
edg_wll_GetParam()

std::string ServerConnection::getParamString edg_wll_ContextParam  name  )  const
 

Get communication parameters of string type.

Gets the named parameter of string type.

Parameters:
in] name Symbolic name of the parameter.
Exceptions:
LoggingException Getting parameter failed.
See also:
edg_wll_GetParam()

struct timeval ServerConnection::getParamTime edg_wll_ContextParam  name  )  const
 

Get communication parameters of timeval type.

Gets the named parameter of timeval type.

Parameters:
in] name Symbolic name of the parameter.
Exceptions:
LoggingException Getting parameter failed.
See also:
edg_wll_GetParam()

void ServerConnection::open const std::string &   ) 
 

DEPRECATED.

Exceptions:
Exception Always.

const std::vector<Event> ServerConnection::queryEvents const std::vector< std::vector< QueryRecord > > &  job_cond,
const std::vector< std::vector< QueryRecord > > &  event_cond
const
 

Convenience form of queryEvents.

The same as previous, but the resulting vector is passed as a return value.

void ServerConnection::queryEvents const std::vector< std::vector< QueryRecord > > &  job_cond,
const std::vector< std::vector< QueryRecord > > &  event_cond,
std::vector< Event > &  eventList
const
 

Retrieve all events satisfying the conjunctive-disjunctive query.

Returns all events belonging to the jobs specified by job_cond and satisfying query_cond. The conditions are given in conjunctive-disjunctive form ((cond1 OR cond2 OR ...) AND ...)

Parameters:
in] job_cond Vector of conditions on jobs.
in] event_cond Vector of coditions on events.
out] eventList Returned Event's.
Exceptions:
LoggingException Query failed.

const std::vector<Event> ServerConnection::queryEvents const std::vector< QueryRecord > &  job_cond,
const std::vector< QueryRecord > &  event_cond
const
 

Convenience form of queryEvents.

std::string ServerConnection::queryEventsAggregate const std::vector< QueryRecord > &  job_cond,
const std::vector< QueryRecord > &  event_cond,
enum AggOp const  op,
std::string const  attr
const
 

NOT IMPLEMENTED.

Parameters:
in] job_cond
in] event_cond Vectors of conditions to be satisfied by jobs as a whole or particular events.
in] op Aggregate operator to apply.
in] attr Attribute to apply the operation to.

const std::list<Event> ServerConnection::queryEventsList const std::vector< QueryRecord > &  job_cond,
const std::vector< QueryRecord > &  event_cond
const
 

Another modification of queryEvents.

The same method, but the results are returned as a list instead of vector.

const std::vector<glite::wmsutils::jobid::JobId> ServerConnection::queryJobs const std::vector< std::vector< QueryRecord > > &  query  )  const
 

Convenience form of queryJobs.

Same as above, but result is passed as a retutrn value.

void ServerConnection::queryJobs const std::vector< std::vector< QueryRecord > > &  query,
std::vector< glite::wmsutils::jobid::JobId > &  jobList
const
 

Retrieve jobs satisfying the query.

Finds all jobs satisfying query given in conjunctive-disjunctive form.

Parameters:
in] query Conjunction of disjunctive queries.
out] jobList Job id's of found jobs.
Exceptions:
LoggingException Query failed.

const std::vector<glite::wmsutils::jobid::JobId> ServerConnection::queryJobs const std::vector< QueryRecord > &  query  )  const
 

Convenience form of queryJobs.

The same as above, but job id's are passed as a return value.

void ServerConnection::queryJobs const std::vector< QueryRecord > &  query,
std::vector< glite::wmsutils::jobid::JobId > &  jobList
const
 

Retrieve jobs satisfying the query.

Finds all jobs (represented as JobId's) satisfying given query.

Parameters:
in] query Query in conjunctive form.
out] jobList List of job id's.
Exceptions:
LoggingException Query failed.

const std::vector<JobStatus> ServerConnection::queryJobStates const std::vector< std::vector< QueryRecord > > &  query,
int  flags
const
 

Convenience form of queryJobStates.

Same as above, but the result is passed as a return value.

void ServerConnection::queryJobStates const std::vector< std::vector< QueryRecord > > &  query,
int  flags,
std::vector< JobStatus > &  states
const
 

Retrieve status of jobs satisfying the given conjunctive-disjunctive query.

Returns states (represented by JobStatus) of all jobs satisfying the query in conjunctive form.

Parameters:
in] query Condition on jobs.
in] flags The same as Job::status() flags.
out] states States of jobs satysfying the condition.
Exceptions:
LoggingException Query failed.

const std::vector<JobStatus> ServerConnection::queryJobStates const std::vector< QueryRecord > &  query,
int  flags
const
 

Convenience form of queryJobStates.

Same as above, but the result is passed as a return value.

void ServerConnection::queryJobStates const std::vector< QueryRecord > &  query,
int  flags,
std::vector< JobStatus > &  states
const
 

Retrieve status of jobs satisfying the given simple query.

Returns states (represented by JobStatus) of all jobs satisfying the query in conjunctive form.

Parameters:
in] query Condition on jobs.
in] flags The same as Job::status() flags.
out] states States of jobs satysfying the condition.
Exceptions:
LoggingException Query failed.

const std::list<JobStatus> ServerConnection::queryJobStatesList const std::vector< QueryRecord > &  query,
int  flags
const
 

Convenience form of queryJobStates.

Same as above, but results are returned as list instead of vector.

void ServerConnection::setParam edg_wll_ContextParam  name,
const struct timeval &  value
 

Set communication parameters of timeval type.

Sets the named parameter to the given timeval value.

Parameters:
in] name Symbolic name of the parameter.
in] value Value.
Exceptions:
LoggingException Setting parameter failed.
See also:
edg_wll_SetParam()

void ServerConnection::setParam edg_wll_ContextParam  name,
const std::string &  value
 

Set communication parameters of string type.

Sets the named parameter to the given string value.

Parameters:
in] name Symbolic name of the parameter.
in] value Value.
Exceptions:
LoggingException Setting parameter failed.
See also:
edg_wll_SetParam()

void ServerConnection::setParam edg_wll_ContextParam  name,
int  value
 

Set communication parameters of integer type.

Sets the named parameter to the given integer value.

Parameters:
in] name Symbolic name of the parameter.
in] value Value.
Exceptions:
LoggingException Setting parameter failed.
See also:
edg_wll_SetParam()

const std::vector<glite::wmsutils::jobid::JobId> ServerConnection::userJobs  )  const
 

Convenience form of userJobs.

Same as above, but results are passed as a return value.

void ServerConnection::userJobs std::vector< glite::wmsutils::jobid::JobId > &  jobs  )  const
 

Find all user's jobs.

Convenience wrapper around queryJobs, returns id's of all jobs whose owner is the current user (as named in the X509 certificate subject).

Parameters:
out] jobs Id's of jobs owned by this user.
Exceptions:
LoggingException Query failed.

const std::vector<JobStatus> ServerConnection::userJobStates  )  const
 

void ServerConnection::userJobStates std::vector< JobStatus > &  stateList  )  const
 

Return states of all user's jobs.

Convenience wrapper around queryJobStates, returns status of all jobs whose owner is the current user (as named in the X509 certificate subject).

Parameters:
out] stateList States of jobs owned by this user.
Exceptions:
LoggingException Query failed.


Friends And Related Function Documentation

friend class Job [friend]
 


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