-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from FreeTAKTeam/service-support
Service support
- Loading branch information
Showing
16 changed files
with
487 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,52 @@ | ||
from digitalpy.core.zmanager.impl.abstract_controller_message import AbstractControllerMessage | ||
from digitalpy.core.zmanager.request import Request | ||
from digitalpy.core.zmanager.response import Response | ||
import json | ||
|
||
class DefaultRequest(Request, AbstractControllerMessage): | ||
|
||
"""default request object used in most cases | ||
""" | ||
def __init__(self): | ||
"""constructor for default request object | ||
""" | ||
super().__init__() | ||
self.response = None | ||
self.method = None | ||
|
||
def set_response(self, response): | ||
def set_response(self, response: Response): | ||
"""Set the response for this request. | ||
This method sets the response object for this request and sets this request | ||
as the request for the response. | ||
Args: | ||
response (Response): The response object to set for this request. | ||
Returns: | ||
None. | ||
""" | ||
self.response = response | ||
if response.get_request != self: | ||
if response.get_request() != self: | ||
response.set_request(self) | ||
|
||
def get_response(self): | ||
|
||
def get_response(self) -> Response: | ||
"""Get the response for this request. | ||
This method returns the response object for this request. | ||
Returns: | ||
Response: The response object for this request. | ||
""" | ||
return self.response | ||
|
||
def get_method(self): | ||
def get_method(self) -> str: | ||
"""Get the method of this request. | ||
This method returns the method of this request. | ||
Returns: | ||
str: The method of this request. | ||
""" | ||
return self.method | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.