RStudio Launcher Plugin SDK  1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
Public Member Functions | Protected Member Functions | List of all members
rstudio::launcher_plugins::jobs::AbstractJobStatusWatcher Class Referenceabstract

Manages posting job status updates to the notifier. More...

#include <AbstractJobStatusWatcher.hpp>

Inheritance diagram for rstudio::launcher_plugins::jobs::AbstractJobStatusWatcher:
rstudio::launcher_plugins::Noncopyable rstudio::launcher_plugins::jobs::AbstractTimedJobStatusWatcher rstudio::launcher_plugins::quickstart::QuickStartJobStatusWatcher

Public Member Functions

virtual ~AbstractJobStatusWatcher ()=default
 Virtual destructor for inheritance.
virtual Error start ()=0
 Starts the job status watcher.
virtual void stop ()=0
 Stops the job status watcher.
- 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.

Protected Member Functions

 AbstractJobStatusWatcher (JobRepositoryPtr in_jobRepository, JobStatusNotifierPtr in_jobStatusNotifier)
 Constructor. More...
Error updateJobStatus (const std::string &in_jobId, api::Job::State in_newStatus, const std::string &in_statusMessage="", const system::DateTime &in_invocationTime=system::DateTime())
 Updates the job status for the specified job. More...

Detailed Description

Manages posting job status updates to the notifier.

Constructor & Destructor Documentation

◆ AbstractJobStatusWatcher()

rstudio::launcher_plugins::jobs::AbstractJobStatusWatcher::AbstractJobStatusWatcher ( JobRepositoryPtr  in_jobRepository,
JobStatusNotifierPtr  in_jobStatusNotifier 


in_jobRepositoryThe job repository, from which to look-up jobs.
in_jobStatusNotifierThe job status notifier to which to post job updates.

Member Function Documentation

◆ updateJobStatus()

Error rstudio::launcher_plugins::jobs::AbstractJobStatusWatcher::updateJobStatus ( const std::string &  in_jobId,
api::Job::State  in_newStatus,
const std::string &  in_statusMessage = "",
const system::DateTime in_invocationTime = system::DateTime() 

Updates the job status for the specified job.

Attempts to look up the job in the repository. If the job cannot be found getJobDetails(...) will be invoked.

in_jobIdThe ID of the job which should be updated.
in_newStatusThe new status of the job.
in_statusMessageThe new status message of the job, if any.
in_invocationTimeThe time at which the job was updated, if different from now.
Success if the job could be found and updated; Error otherwise.

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