Handles commands received over the network.
More...
Handles commands received over the network.
This Resource handles commands received over the hardware manager's command connection.
| def hwm.command.connection.CommandResource.__init__ |
( |
|
self, |
|
|
|
command_parser |
|
) |
| |
Sets up the command resource.
- Parameters
-
| command_parser | A reference to the previously initialized command parser. |
| def hwm.command.connection.CommandResource._command_response_ready |
( |
|
self, |
|
|
|
command_response, |
|
|
|
request |
|
) |
| |
|
private |
Writes the command response back to the originating request.
This callback writes the response of a command back to the network via the request that generated it. It handles
both successful and failed command responses.
- Parameters
-
| command_response | The results of the command. If the command was successful, this will be a dictionary containing the command response. If the command failed, this will be a Failure object containing the command response encapsulated in a CommandError exception. |
| request | The original HTTP request for the connection. |
| def hwm.command.connection.CommandResource.render_POST |
( |
|
self, |
|
|
|
request |
|
) |
| |
Responds to POST'd command requests.
- Parameters
-
| request | The request object for the submitted command. |
- Returns
- Returns NOT_DONE_YET, indicating that the results of the request may not be ready yet (results handled by self._command_response_ready).
The documentation for this class was generated from the following file:
- hwm/command/connection.py