SAGA C++ API 1.6
saga::job::service Class Reference

The job_service represents a resource management backend, and as such allows to create and submit jobs, and to discover jobs. More...

#include <job_service.hpp>

Inheritance diagram for saga::job::service:

List of all members.

Public Member Functions

 service (session const &s, saga::url rm=saga::url())
 Creates the object.
 service (saga::url rm=saga::url())
 Creates the object.
 service (saga::object const &o)
 Creates the object.
 ~service (void)
 Destroys the object.
serviceoperator= (saga::object const &o)
 Brief description starts here.
job create_job (description job_desc)
 Create a job instance.
saga::url get_url () const
 Create a job instance.
job run_job (std::string commandline, std::string hostname, saga::job::ostream &stdin_stream, saga::job::istream &stdout_stream, saga::job::istream &stderr_stream)
 Run a command synchronously.
job run_job (std::string commandline, std::string hostname="")
std::vector< std::string > list (void)
 Get a list of jobs which are currently known by the resource manager.
job get_job (std::string job_id)
 Given a job identifier, this method returns a job object representing this job.
saga::job::self get_self ()
 This method returns a job object representing _this_ job, i.e. the calling application.

Static Public Member Functions

static service create (session const &s, saga::url rm=saga::url())
 Factory function resembling service(session, url) constructor.
static service create (saga::url rm=saga::url())
 Factory function resembling service(url, int) constructor.
template<typename Tag >
static saga::task create (saga::url rm=saga::url())

Detailed Description

The job_service represents a resource management backend, and as such allows to create and submit jobs, and to discover jobs.

The job management methods are on the job object itself - this probably implies that implementations need to internally track what resource manager (or job_service instance) created the job.

Definition at line 56 of file job_service.hpp.


Constructor & Destructor Documentation

saga::job::service::service ( session const &  s,
saga::url  rm = saga::url() 
) [explicit]

Creates the object.

Definition at line 31 of file job_service.cpp.

saga::job::service::service ( saga::url  rm = saga::url()) [explicit]

Creates the object.

Definition at line 37 of file job_service.cpp.

saga::job::service::service ( saga::object const &  o) [explicit]

Creates the object.

Definition at line 43 of file job_service.cpp.

References saga::BadParameter, saga::object::get_type(), and saga::object::JobService.

saga::job::service::~service ( void  )

Destroys the object.

Definition at line 61 of file job_service.cpp.


Member Function Documentation

static service saga::job::service::create ( session const &  s,
saga::url  rm = saga::url() 
) [inline, static]

Factory function resembling service(session, url) constructor.

Definition at line 115 of file job_service.hpp.

static service saga::job::service::create ( saga::url  rm = saga::url()) [inline, static]

Factory function resembling service(url, int) constructor.

Definition at line 125 of file job_service.hpp.

template<typename Tag >
static saga::task saga::job::service::create ( saga::url  rm = saga::url()) [inline, static]

Definition at line 130 of file job_service.hpp.

service & saga::job::service::operator= ( saga::object const &  o)

Brief description starts here.

Definition at line 65 of file job_service.cpp.

job saga::job::service::create_job ( description  job_desc) [inline]

Create a job instance.

Parameters:
job_descDescription of job to be submitted
Returns:
A job object representing the submitted job instance

Definition at line 148 of file job_service.hpp.

References saga::task::get_result().

saga::url saga::job::service::get_url ( ) const [inline]

Create a job instance.

Returns:
The resource manager url used to create this job_service instance

Definition at line 159 of file job_service.hpp.

References saga::task::get_result().

job saga::job::service::run_job ( std::string  commandline,
std::string  hostname,
saga::job::ostream stdin_stream,
saga::job::istream stdout_stream,
saga::job::istream stderr_stream 
) [inline]

Run a command synchronously.

Parameters:
hostnameHostname to be used by rm for submission
commandlineThe command and arguments to be run

Definition at line 173 of file job_service.hpp.

References saga::task::get_result().

job saga::job::service::run_job ( std::string  commandline,
std::string  hostname = "" 
) [inline]

Definition at line 186 of file job_service.hpp.

References saga::task::get_result().

std::vector<std::string> saga::job::service::list ( void  ) [inline]

Get a list of jobs which are currently known by the resource manager.

Returns:
An array of job identifiers

Definition at line 203 of file job_service.hpp.

References saga::task::get_result().

job saga::job::service::get_job ( std::string  job_id) [inline]

Given a job identifier, this method returns a job object representing this job.

Parameters:
job_idJob identifier as returned by the resource manager
Returns:
A job object representing the job identified by job_id

Definition at line 218 of file job_service.hpp.

References saga::task::get_result().

saga::job::self saga::job::service::get_self ( ) [inline]

This method returns a job object representing _this_ job, i.e. the calling application.

Returns:
A job_self object representing _this_ job.

Definition at line 234 of file job_service.hpp.

References saga::task::get_result().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines