RStudio Launcher Plugin SDK
1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
|
25 #ifndef LAUNCHER_PLUGINS_RESPONSE_HPP
26 #define LAUNCHER_PLUGINS_RESPONSE_HPP
28 #include <Noncopyable.hpp>
33 #include <api/Job.hpp>
34 #include <api/ResponseTypes.hpp>
35 #include <api/stream/AbstractOutputStream.hpp>
38 namespace launcher_plugins {
48 namespace launcher_plugins {
51 struct JobSourceConfiguration;
122 PRIVATE_IMPL(m_responseImpl);
149 PRIVATE_IMPL(m_streamResponseImpl);
167 INVALID_RESPONSE = -1,
169 REQUEST_NOT_SUPPORTED = 1,
172 PLUGIN_RESTARTED = 4,
175 JOB_OUTPUT_NOT_FOUND = 7,
176 INVALID_JOB_STATE = 8,
177 JOB_CONTROL_FAILURE = 9,
178 UNSUPPORTED_VERSION = 10,
188 ErrorResponse(uint64_t in_requestId,
Type in_errorType, std::string in_errorMessage);
199 PRIVATE_IMPL(m_impl);
253 uint64_t in_requestId,
255 Optional<std::set<std::string> > in_jobFields =
Optional<std::set<std::string> >());
266 PRIVATE_IMPL(m_impl);
292 PRIVATE_IMPL(m_impl);
308 ControlJobResponse(uint64_t in_requestId, std::string in_statusMessage,
bool in_isComplete);
320 PRIVATE_IMPL(m_impl);
338 uint64_t in_requestId,
339 uint64_t in_sequenceId,
340 std::string in_output,
341 OutputType in_outputType);
350 uint64_t in_requestId,
351 uint64_t in_sequenceId);
362 PRIVATE_IMPL(m_impl);
379 StreamSequences in_sequences,
392 PRIVATE_IMPL(m_impl);
418 PRIVATE_IMPL(m_impl);
445 PRIVATE_IMPL(m_impl);
Type
Definition: Response.hpp:79
Represents the network information for a job.
Definition: ResponseTypes.hpp:129
json::Object toJson() const override
Converts this job state response to a JSON object.
virtual json::Object toJson() const
Converts this response to a JSON object.
Class which represents a specific type of JSON Value: a JSON object.
Definition: Json.hpp:687
NetworkResponse(uint64_t in_requestId, NetworkInfo in_networkInfo)
Constructor.
HeartbeatResponse()
Constructor.
Class which represents a Resource Utilization Stream response for a specific job.
Definition: Response.hpp:368
json::Object toJson() const override
Converts this control job response to a JSON object.
json::Object toJson() const override
Converts this MultiStreamResponse to a JSON object.
Class which represents a job state response which can be sent to the Launcher in response to a get or...
Definition: Response.hpp:241
Represents the current resource utilization of a job.
Definition: ResponseTypes.hpp:111
ErrorResponse(uint64_t in_requestId, Type in_errorType, std::string in_errorMessage)
Constructor.
MultiStreamResponse(Type in_responseType, StreamSequences in_sequences)
Constructor.
Class which represents a Job Output Stream response for a specific job.
Definition: Response.hpp:326
json::Object toJson() const override
Converts this cluster info response to a JSON object.
Class which represents a bootstrap response which can be sent to the Launcher in response to a bootst...
Definition: Response.hpp:219
ControlJobResponse(uint64_t in_requestId, std::string in_statusMessage, bool in_isComplete)
Constructor.
Class which represents an error response which can be sent to the Launcher in response to any request...
Definition: Response.hpp:155
json::Object toJson() const override
Converts this cluster info response to a JSON object.
Class which represents a cluster info response which should be sent to the Launcher in response to a ...
Definition: Response.hpp:425
json::Object toJson() const override
Converts this resource utilization stream response to a JSON object.
json::Object toJson() const override
Converts this output stream response to a JSON object.
OutputStreamResponse(uint64_t in_requestId, uint64_t in_sequenceId, std::string in_output, OutputType in_outputType)
Constructor.
BootstrapResponse(uint64_t in_requestId)
Constructor.
Base class for responses which are returned to multiple stream requests.
Definition: Response.hpp:128
Class which represents a Job Status Stream, either for all jobs or for a specific job.
Definition: Response.hpp:272
JobStateResponse(uint64_t in_requestId, JobList in_jobs, Optional< std::set< std::string > > in_jobFields=Optional< std::set< std::string > >())
Constructor.
Describes the capabilities and configuration of this Job Source.
Definition: IJobSource.hpp:77
ResourceUtilStreamResponse(StreamSequences in_sequences, const ResourceUtilData &in_resourceData, bool in_isComplete)
Constructor.
Represents the common components of all responses which can be sent the RStudio Launcher.
Definition: Response.hpp:56
JobStatusResponse(StreamSequences in_sequences, const JobPtr &in_job)
Constructor.
ClusterInfoResponse(uint64_t in_requestId, const JobSourceConfiguration &in_configuration)
Constructor.
json::Object toJson() const override
Converts this job status response to a JSON object.
json::Object toJson() const override
Converts this bootstrap response to a JSON object.
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
virtual ~Response()=default
Virtual destructor to allow for inheritance.
Response(Type in_responseType, uint64_t in_requestId)
Constructor.
Class which represents a network information response which should be sent to the Launcher in respons...
Definition: Response.hpp:399
Class which represents a heartbeat response which should be sent to the Launcher every configured hea...
Definition: Response.hpp:206
json::Object toJson() const override
Converts this error response to a JSON object.
Class which represents the result of a control job operation.
Definition: Response.hpp:298