# 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:

[legend]

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.
service & | operator= (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.

## Constructor & Destructor Documentation

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

Creates the object.

Reimplemented in saga::cpr::service.

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

Creates the object.

Reimplemented in saga::cpr::service.

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

Creates the object.

Reimplemented in saga::cpr::service.

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

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

Destroys the object.

Reimplemented in saga::cpr::service.

## 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.

Reimplemented in saga::cpr::service.

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

Factory function resembling service(url, int) constructor.

Reimplemented in saga::cpr::service, and saga::cpr::service.

template<typename Tag>

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

Reimplemented in saga::cpr::service, and saga::cpr::service.

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

Brief description starts here.

Reimplemented in saga::cpr::service.

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

Create a job instance.

Parameters:

  | job_desc | Description of job to be submitted

Returns:
  A job object representing the submitted job instance

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

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:

  | hostname | Hostname to be used by rm for submission
  | commandline | The command and arguments to be run

Reimplemented in saga::cpr::service.

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

Reimplemented in saga::cpr::service.

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

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_id | Job identifier as returned by the resource manager

Returns:
  A job object representing the job identified by job_id

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.

The documentation for this class was generated from the following files:

- job_service.hpp
- job_service.cpp