|
WSF
|
Maintains a group of WsfXIO_Requests. More...
#include <WsfXIO_Request.hpp>


Public Types | |
| using | RequestMap = std::map<int, WsfXIO_Request*> |
| using | SessionMap = std::map<WsfXIO_SubscriptionId, WsfXIO_ServiceSession*> |
Public Member Functions | |
| WsfXIO_RequestManager (WsfXIO_Interface *aInterfacePtr) | |
| virtual | ~WsfXIO_RequestManager () |
| void | AddRequest (WsfXIO_Request *aRequestPtr) |
| void | RemoveRequest (WsfXIO_Request *aRequestPtr) |
| bool | RemoveRequest (int aRequestId) |
| WsfXIO_Request * | FindRequest (int aRequestId) |
| Returns the request with the given request ID if it exists. | |
| void | AddSession (WsfXIO_ServiceSession *aSessionPtr) |
| Adds a session to the request manager for the primary goal of routing WsfXIO_ResponsePkt to the session. | |
| void | RemoveSession (WsfXIO_ServiceSession *aSessionPtr) |
| Removes the session from the request manager. | |
| const SessionMap & | GetSessions () const |
| const RequestMap & | GetRequests () const |
Protected Member Functions | |
| virtual void | RequestCancelled (WsfXIO_Request *aRequestPtr) |
| void | HandleRequestResponse (WsfXIO_ResponsePkt &aPkt) |
| void | HandleCancel (WsfXIO_SubscriptionCancelPkt &aPkt) |
| Handles subscription cancellation notifications. | |
| void | HandleDisconnect (WsfXIO_Connection *aConnectionPtr) |
| Removes any requests on a lost connection. | |
Protected Attributes | |
| UtCallbackHolder | mCallbacks |
| WsfXIO_Interface * | mInterfacePtr {nullptr} |
Maintains a group of WsfXIO_Requests.
| using WsfXIO_RequestManager::RequestMap = std::map<int, WsfXIO_Request*> |
| using WsfXIO_RequestManager::SessionMap = std::map<WsfXIO_SubscriptionId, WsfXIO_ServiceSession*> |
| WsfXIO_RequestManager::WsfXIO_RequestManager | ( | WsfXIO_Interface * | aInterfacePtr | ) |
|
virtual |
| void WsfXIO_RequestManager::AddRequest | ( | WsfXIO_Request * | aRequestPtr | ) |
Begins maintaining a WsfXIO_Request. The WsfXIO_RequestManager gains ownership of the request.
WsfXIO_RequestManager takes control of the request. The request is initialized and sent to the remote application. WsfXIO_RequestManager will delete the request upon cancellation.
References WsfXIO_Request::Initialized(), WsfXIO_Request::SetRequestId(), and WsfXIO_Request::SetRequestManager().
Referenced by WsfXIO_DisRequestManager::AddRequest(), and WsfXIO_TrackRequestManager::AddRequest().
| void WsfXIO_RequestManager::AddSession | ( | WsfXIO_ServiceSession * | aSessionPtr | ) |
Adds a session to the request manager for the primary goal of routing WsfXIO_ResponsePkt to the session.
References WsfXIO_Subscription::GetId(), and WsfXIO_ServiceSession::GetSubscription().
| WsfXIO_Request * WsfXIO_RequestManager::FindRequest | ( | int | aRequestId | ) |
Returns the request with the given request ID if it exists.
|
inline |
|
inline |
|
protected |
Handles subscription cancellation notifications.
References WsfXIO_SubscriptionCancelPkt::mIsRequest, WsfXIO_SubscriptionCancelPkt::mSubscriptionId, RequestCancelled(), and WsfXIO_Request::SetRemotelyDestroyed().
Referenced by WsfXIO_RequestManager().
|
protected |
Removes any requests on a lost connection.
References RequestCancelled(), and WsfXIO_Request::SetRemotelyDestroyed().
Referenced by WsfXIO_RequestManager().
|
protected |
| bool WsfXIO_RequestManager::RemoveRequest | ( | int | aRequestId | ) |
Cancels a request currently owned by this request manager. The request will be deleted by this class. Returns 'true' if the request was found.
References RemoveRequest().
| void WsfXIO_RequestManager::RemoveRequest | ( | WsfXIO_Request * | aRequestPtr | ) |
Cancels a request currently owned by this request manager. The request will be deleted by this class.
References RequestCancelled().
Referenced by WsfXIO_DisRequestManager::RemoveRequest(), RemoveRequest(), WsfXIO_TrackRequestManager::RemoveRequest(), and WsfXIO_TrackRequestManager::RemoveRequest().
| void WsfXIO_RequestManager::RemoveSession | ( | WsfXIO_ServiceSession * | aSessionPtr | ) |
Removes the session from the request manager.
References WsfXIO_Subscription::GetId(), and WsfXIO_ServiceSession::GetSubscription().
|
protectedvirtual |
Reimplemented in WsfXIO_TrackRequestManager.
References WsfXIO_Request::GetConnection(), WsfXIO_Request::GetRequestId(), WsfXIO_Request::IsRemotelyDestroyed(), WsfXIO_SubscriptionCancelPkt::mIsRequest, WsfXIO_SubscriptionCancelPkt::mSubscriptionId, and WsfXIO_Connection::Send().
Referenced by HandleCancel(), HandleDisconnect(), HandleRequestResponse(), RemoveRequest(), and WsfXIO_TrackRequestManager::RequestCancelled().
|
protected |
|
protected |
Referenced by WsfXIO_RequestManager().