Streams job output data to the launcher.
More...
#include <AbstractOutputStream.hpp>
|
| typedef std::function< void(uint64_t)> | OnComplete |
| |
|
typedef std::function< void(const Error &)> | OnError |
| |
|
typedef std::function< void(const std::string &, OutputType, uint64_t)> | OnOutput |
| |
|
| | AbstractOutputStream (OutputType in_outputType, JobPtr in_job, OnOutput in_onOutput, OnComplete in_onComplete, OnError in_onError) |
| | Constructor. More...
|
| |
| void | reportData (const std::string &in_data, OutputType in_outputType) |
| | Reports output to the launcher. More...
|
| |
| void | reportError (const Error &in_error) |
| | Reports an error to the launcher. More...
|
| |
|
void | setStreamComplete () |
| | Notifies the base class that the output stream has completed (i.e. all output of the specified type has been reported).
|
| |
Streams job output data to the launcher.
◆ OnComplete
Definitions for callback functions which will be invoked when certain events occur.
◆ AbstractOutputStream()
| rstudio::launcher_plugins::api::AbstractOutputStream::AbstractOutputStream |
( |
OutputType |
in_outputType, |
|
|
JobPtr |
in_job, |
|
|
OnOutput |
in_onOutput, |
|
|
OnComplete |
in_onComplete, |
|
|
OnError |
in_onError |
|
) |
| |
|
protected |
Constructor.
- Parameters
-
| in_requestId | The ID of the request for which job output should be streamed. |
| in_outputType | The type of job output to stream. |
| in_onOutput | Callback function which will be invoked when data is reported. |
| in_onComplete | Callback function which will be invoked when the stream is complete. |
| in_onError | Callback function which will be invoked if an error occurs. |
| in_job | The job for which output should be streamed. |
◆ reportData()
| void rstudio::launcher_plugins::api::AbstractOutputStream::reportData |
( |
const std::string & |
in_data, |
|
|
OutputType |
in_outputType |
|
) |
| |
|
protected |
Reports output to the launcher.
- Parameters
-
| in_data | The output data. |
| in_outputType | The type of output data. |
◆ reportError()
| void rstudio::launcher_plugins::api::AbstractOutputStream::reportError |
( |
const Error & |
in_error | ) |
|
|
protected |
Reports an error to the launcher.
- Parameters
-
| in_error | The error which occurred. |
◆ start()
| virtual Error rstudio::launcher_plugins::api::AbstractOutputStream::start |
( |
| ) |
|
|
pure virtual |
◆ m_job
| JobPtr rstudio::launcher_plugins::api::AbstractOutputStream::m_job |
|
protected |
The job for which output should be streamed.
◆ m_outputType
| OutputType rstudio::launcher_plugins::api::AbstractOutputStream::m_outputType |
|
protected |
The type of output that should be streamed.
The documentation for this class was generated from the following file: