RStudio Launcher Plugin SDK
1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
|
24 #ifndef LAUNCHER_PLUGINS_REQUEST_HPP
25 #define LAUNCHER_PLUGINS_REQUEST_HPP
27 #include <Noncopyable.hpp>
33 #include <Optional.hpp>
34 #include <api/Job.hpp>
35 #include <api/stream/AbstractOutputStream.hpp>
36 #include <system/DateTime.hpp>
39 namespace launcher_plugins {
58 namespace launcher_plugins {
132 uint64_t
getId()
const;
151 PRIVATE_IMPL(m_baseImpl);
190 PRIVATE_IMPL(m_userImpl);
206 const std::string&
getJobId()
const;
225 PRIVATE_IMPL(m_jobIdImpl);
264 PRIVATE_IMPL(m_impl);
291 PRIVATE_IMPL(m_impl);
365 PRIVATE_IMPL(m_impl);
392 PRIVATE_IMPL(m_impl);
445 PRIVATE_IMPL(m_impl);
480 PRIVATE_IMPL(m_impl);
508 PRIVATE_IMPL(m_impl);
537 std::ostream& operator<<(std::ostream& in_ostream,
Request::Type in_type);
Class which represents a specific type of JSON Value: a JSON object.
Definition: Json.hpp:687
Error getStatusSet(Optional< std::set< Job::State > > &out_statuses) const
Gets the set of Job statuses by which to filter the returned list of jobs.
JobIdRequest(Request::Type in_type, const json::Object &in_requestJson)
Constructor.
Type getType() const
Gets the request type.
Request from the Launcher to get the network information for a job.
Definition: Request.hpp:516
Request from the launcher to begin or end a Resource Utilization Stream.
Definition: Request.hpp:489
Class which represents a system user.
Definition: User.hpp:55
int getPatchNumber() const
Gets the patch number of the RStudio Launcher that sent this bootstrap request.
Operation getOperation() const
Gets the control job action which should be taken.
int getMinorVersion() const
Gets the minor version of the RStudio Launcher that sent this bootstrap request.
virtual ~Request()=default
Virtual destructor for inheritance.
Represents a job state request received from the Launcher.
Definition: Request.hpp:299
Request(Type in_requestType, const json::Object &in_requestJson)
Constructor.
Represents a submit job request from the Launcher.
Definition: Request.hpp:272
OutputType getStreamType() const
Gets the type of Output that should be streamed.
bool isCancelRequest() const
Gets whether the Job Status Stream should be started (false) or ended (true).
const std::string & getEncodedJobId() const
Gets the ID of the job for which this request was made.
uint64_t getId() const
Gets the ID of this request.
int getMajorVersion() const
Gets the major version of the RStudio Launcher that sent this bootstrap request.
bool isCancelRequest() const
Gets whether the Resource Utilization Stream should be started (false) or ended (true).
Base class for all requests which may be received from the Launcher.
Definition: Request.hpp:64
JobPtr getJob()
Gets the job that should be submitted to the Job Scheduling System.
Request from the launcher to control the state of a Job.
Definition: Request.hpp:400
Operation
Definition: Request.hpp:407
Request from the launcher to begin or end a Job Output Stream.
Definition: Request.hpp:453
const std::string & getJobId() const
Gets the ID of the job for which this request was made.
const Optional< std::set< std::string > > & getTagSet() const
Gets the set of Job tags by which to filter the returned list of jobs.
const system::User & getUser() const
Gets the user who initiated this request.
Class which represents an error.
Definition: Error.hpp:174
Base class which should be used by the class of requests which require a username.
Definition: Request.hpp:157
Represents a bootstrap request received from the Launcher.
Definition: Request.hpp:231
const std::string & getRequestUsername() const
Gets the actual username that was used when the request was submitted.
Error getEndTime(Optional< system::DateTime > &out_endTime) const
Gets the end of the date range for this request.
Request from the launcher to begin or end a Job Status Stream.
Definition: Request.hpp:373
Class which can be inherited from to disallow copying of its child classes.
Definition: Noncopyable.hpp:34
Container class which represents a value that may or may not be set.
Definition: Optional.hpp:38
Base class which should be used for requests that require a Job ID.
Definition: Request.hpp:198
bool isCancelRequest() const
Gets whether the Job Output Stream should be started (false) or ended (true).
const Optional< std::set< std::string > > & getFieldSet() const
Gets the set of Job fields which should be included in the response.
static Error fromJson(const json::Object &in_requestJson, std::shared_ptr< Request > &out_request)
Converts a Json::Object into the appropriate Request object.
Type
Definition: Request.hpp:76
Error getStartTime(Optional< system::DateTime > &out_endTime) const
Gets the start of the date range for this request.
UserRequest(Request::Type in_type, const json::Object &in_requestJson)
Constructor.