RStudio Launcher Plugin SDK
1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
|
24 #ifndef LAUNCHER_PLUGINS_QUICK_START_JOB_SOURCE_HPP
25 #define LAUNCHER_PLUGINS_QUICK_START_JOB_SOURCE_HPP
27 #include <api/IJobSource.hpp>
29 #include <jobs/AbstractJobRepository.hpp>
30 #include <jobs/JobStatusNotifier.hpp>
32 #include "QuickStartJobStatusWatcher.hpp"
35 namespace launcher_plugins {
36 namespace quickstart {
52 const jobs::JobRepositoryPtr& in_jobRepository,
53 const jobs::JobStatusNotifierPtr& in_jobStatusNotifier);
76 bool cancelJob(api::JobPtr in_job,
bool& out_isComplete, std::string& out_statusMessage)
override;
122 bool killJob(api::JobPtr in_job,
bool& out_isComplete, std::string& out_statusMessage)
override;
137 bool resumeJob(api::JobPtr in_job,
bool& out_isComplete, std::string& out_statusMessage)
override;
151 bool stopJob(api::JobPtr in_job,
bool& out_isComplete, std::string& out_statusMessage)
override;
167 bool suspendJob(api::JobPtr in_job,
bool& out_isComplete, std::string& out_statusMessage)
override;
180 Error submitJob(api::JobPtr io_job,
bool& out_wasInvalidRequest)
const override;
195 api::OutputType in_outputType,
197 api::AbstractOutputStream::OnOutput in_onOutput,
199 api::AbstractOutputStream::OnError in_onError,
200 api::OutputStreamPtr& out_outputStream)
override;
212 api::ConstJobPtr in_job,
213 comms::AbstractLauncherCommunicatorPtr in_launcherCommunicator,
214 api::AbstractResourceStreamPtr& out_resourceStream)
override;
217 QuickStartJobStatusWatcherPtr m_jobStatusWatcher;
Represents the network information for a job.
Definition: ResponseTypes.hpp:129
bool suspendJob(api::JobPtr in_job, bool &out_isComplete, std::string &out_statusMessage) override
Suspends a running job.
bool cancelJob(api::JobPtr in_job, bool &out_isComplete, std::string &out_statusMessage) override
Cancels a pending job.
Error submitJob(api::JobPtr io_job, bool &out_wasInvalidRequest) const override
Submits a job to the Job Scheduling System.
Class which represents a system user.
Definition: User.hpp:55
Error createResourceStream(api::ConstJobPtr in_job, comms::AbstractLauncherCommunicatorPtr in_launcherCommunicator, api::AbstractResourceStreamPtr &out_resourceStream) override
Creates a resource utilization metric stream for the specified job.
std::function< void(uint64_t)> OnComplete
Definition: AbstractOutputStream.hpp:66
Error getConfiguration(const system::User &in_user, api::JobSourceConfiguration &out_configuration) const override
Gets the configuration and capabilities of this Job Source for the specified user.
Class which is responsible for running and retrieving information about jobs in the job scheduling sy...
Definition: QuickStartJobSource.hpp:41
QuickStartJobSource(const jobs::JobRepositoryPtr &in_jobRepository, const jobs::JobStatusNotifierPtr &in_jobStatusNotifier)
Constructor.
Error initialize() override
Initializes the Job Source.
Error getNetworkInfo(api::JobPtr in_job, api::NetworkInfo &out_networkInfo) const override
Gets the network information for the specified job.
Error createOutputStream(api::OutputType in_outputType, api::JobPtr in_job, api::AbstractOutputStream::OnOutput in_onOutput, api::AbstractOutputStream::OnComplete in_onComplete, api::AbstractOutputStream::OnError in_onError, api::OutputStreamPtr &out_outputStream) override
Creates an output stream for the specified job.
bool killJob(api::JobPtr in_job, bool &out_isComplete, std::string &out_statusMessage) override
Forcibly kills a running job.
Class which represents an error.
Definition: Error.hpp:174
Describes the capabilities and configuration of this Job Source.
Definition: IJobSource.hpp:77
Generic interface for communicating with a Job Source. Implementation is plugin specific.
Definition: IJobSource.hpp:99
bool stopJob(api::JobPtr in_job, bool &out_isComplete, std::string &out_statusMessage) override
Stops a running job.
bool resumeJob(api::JobPtr in_job, bool &out_isComplete, std::string &out_statusMessage) override
Resumes a suspended job.