Base class responsible for communicating the the launcher. The type of communication is implementation dependent.
More...
#include <AbstractLauncherCommunicator.hpp>
Base class responsible for communicating the the launcher. The type of communication is implementation dependent.
◆ AbstractLauncherCommunicator()
rstudio::launcher_plugins::comms::AbstractLauncherCommunicator::AbstractLauncherCommunicator |
( |
size_t |
in_maxMessageSize, |
|
|
const OnError & |
in_onError |
|
) |
| |
|
protected |
Constructor.
- Parameters
-
in_maxMessageSize | The maximum allowable size of a message which can be received from or sent to the RStudio Launcher. |
in_onError | Error handler to allow the creator of this communicator to receive communications errors. |
◆ onDataReceived()
void rstudio::launcher_plugins::comms::AbstractLauncherCommunicator::onDataReceived |
( |
const char * |
in_data, |
|
|
size_t |
in_length |
|
) |
| |
|
protected |
Handles data that is received from the RStudio Launcher.
- Parameters
-
in_data | The data received from the RStudio Launcher. |
in_length | The length of the data received from the RStudio Launcher. |
◆ registerRequestHandler()
void rstudio::launcher_plugins::comms::AbstractLauncherCommunicator::registerRequestHandler |
( |
std::unique_ptr< RequestHandler > && |
in_requestHandler | ) |
|
Registers a request handler for all requests.
- Parameters
-
in_requestHandler | The handler for the request. |
◆ reportError()
void rstudio::launcher_plugins::comms::AbstractLauncherCommunicator::reportError |
( |
const Error & |
in_error | ) |
|
|
protected |
Reports an error and stops the communicator.
- Parameters
-
in_error | The error to report. |
◆ sendResponse()
void rstudio::launcher_plugins::comms::AbstractLauncherCommunicator::sendResponse |
( |
const api::Response & |
in_response | ) |
|
Sends the response to the RStudio Launcher.
- Parameters
-
in_response | The response to be sent to the RStudio Launcher. |
◆ shared_from_derived()
template<typename Derived >
std::shared_ptr<Derived> rstudio::launcher_plugins::comms::AbstractLauncherCommunicator::shared_from_derived |
( |
| ) |
|
|
inlineprotected |
@breif Template method which allows classes which inherit AbstractLauncherCommunicator to get a shared_ptr to themselves.
- Template Parameters
-
- Returns
- A shared_ptr to this derived class.
◆ start()
virtual Error rstudio::launcher_plugins::comms::AbstractLauncherCommunicator::start |
( |
| ) |
|
|
virtual |
Starts the communicator.
Child classes which override this method should also invoke the base method.
- Returns
- Success if the communicator could be started; Error otherwise.
◆ stop()
virtual void rstudio::launcher_plugins::comms::AbstractLauncherCommunicator::stop |
( |
| ) |
|
|
virtual |
Stops the communicator.
Child classes which override this method should also invoke the base method.
◆ waitForExit()
virtual void rstudio::launcher_plugins::comms::AbstractLauncherCommunicator::waitForExit |
( |
| ) |
|
|
virtual |
Blocks until the communicator has successfully stopped.
Child classes which override this method should also invoke the base method.
The documentation for this class was generated from the following file: