RStudio Launcher Plugin SDK  1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
rstudio::launcher_plugins::api::Request Class Reference

Base class for all requests which may be received from the Launcher. More...

#include <Request.hpp>

Inheritance diagram for rstudio::launcher_plugins::api::Request:
rstudio::launcher_plugins::Noncopyable rstudio::launcher_plugins::api::BootstrapRequest rstudio::launcher_plugins::api::UserRequest rstudio::launcher_plugins::api::JobIdRequest rstudio::launcher_plugins::api::SubmitJobRequest rstudio::launcher_plugins::api::ControlJobRequest rstudio::launcher_plugins::api::JobStateRequest rstudio::launcher_plugins::api::JobStatusRequest rstudio::launcher_plugins::api::NetworkRequest rstudio::launcher_plugins::api::OutputStreamRequest rstudio::launcher_plugins::api::ResourceUtilStreamRequest

Public Types

enum  Type {
  Type::HEARTBEAT = 0, Type::BOOTSTRAP = 1, Type::SUBMIT_JOB = 2, Type::GET_JOB = 3,
  Type::GET_JOB_STATUS = 4, Type::CONTROL_JOB = 5, Type::GET_JOB_OUTPUT = 6, Type::GET_JOB_RESOURCE_UTIL = 7,
  Type::GET_JOB_NETWORK = 8, Type::GET_CLUSTER_INFO = 9, Type::INVALID
}
 

Public Member Functions

virtual ~Request ()=default
 Virtual destructor for inheritance.
 
uint64_t getId () const
 Gets the ID of this request. More...
 
Type getType () const
 Gets the request type. More...
 
- Public Member Functions inherited from rstudio::launcher_plugins::Noncopyable
 Noncopyable ()=default
 Default constructor.
 
 Noncopyable (const Noncopyable &)=delete
 Deleted copy constructor.
 
Noncopyableoperator= (const Noncopyable &)=delete
 Deleted assignment operator.
 

Static Public Member Functions

static Error fromJson (const json::Object &in_requestJson, std::shared_ptr< Request > &out_request)
 Converts a Json::Object into the appropriate Request object. More...
 

Protected Member Functions

 Request (Type in_requestType, const json::Object &in_requestJson)
 Constructor. More...
 
 PRIVATE_IMPL (m_baseImpl)
 

Detailed Description

Base class for all requests which may be received from the Launcher.

Member Enumeration Documentation

◆ Type

Enumerator
HEARTBEAT 

Heartbeat request

BOOTSTRAP 

Bootstrap request

SUBMIT_JOB 

Submit Job request

GET_JOB 

Get Job request

GET_JOB_STATUS 

Get Job Status request

CONTROL_JOB 

Control Job request

GET_JOB_OUTPUT 

Get Job Output request

GET_JOB_RESOURCE_UTIL 

Get Job Resource Utilization request

GET_JOB_NETWORK 

Get Job Network information request

GET_CLUSTER_INFO 

Get Cluster Info request

INVALID 

Invalid request. Should not be received. Always the last element of this enum for comparison purposes.

Constructor & Destructor Documentation

◆ Request()

rstudio::launcher_plugins::api::Request::Request ( Type  in_requestType,
const json::Object in_requestJson 
)
explicitprotected

Constructor.

Parameters
in_requestTypeThe type of the request.
in_requestJsonThe JSON object representing the request.

Member Function Documentation

◆ fromJson()

static Error rstudio::launcher_plugins::api::Request::fromJson ( const json::Object in_requestJson,
std::shared_ptr< Request > &  out_request 
)
static

Converts a Json::Object into the appropriate Request object.

Parameters
in_requestJsonThe json object which represents a request from the Launcher.
out_requestThe converted request object.
Returns
Success if the provided json Object was valid; Error otherwise.

◆ getId()

uint64_t rstudio::launcher_plugins::api::Request::getId ( ) const

Gets the ID of this request.

Returns
The ID of this request.

◆ getType()

Type rstudio::launcher_plugins::api::Request::getType ( ) const

Gets the request type.

Returns
The type of the request.

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