Commit f08bb338 authored by Dominik Charousset's avatar Dominik Charousset

Add getters to response_promise

parent 91dfd7b5
...@@ -34,6 +34,8 @@ namespace caf { ...@@ -34,6 +34,8 @@ namespace caf {
/// to the client (i.e. the sender of the request). /// to the client (i.e. the sender of the request).
class response_promise { class response_promise {
public: public:
using forwarding_stack = std::vector<strong_actor_ptr>;
/// Constructs an invalid response promise. /// Constructs an invalid response promise.
response_promise(); response_promise();
...@@ -67,9 +69,22 @@ public: ...@@ -67,9 +69,22 @@ public:
return !stages_.empty() || source_; return !stages_.empty() || source_;
} }
private: /// Returns the source of the corresponding request.
using forwarding_stack = std::vector<strong_actor_ptr>; inline const strong_actor_ptr& source() const {
return source_;
}
/// Returns the remaining stages for the corresponding request.
inline const forwarding_stack& stages() const {
return stages_;
}
/// Returns the message ID of the corresponding request.
inline message_id id() const {
return id_;
}
private:
response_promise deliver_impl(message response_message); response_promise deliver_impl(message response_message);
execution_unit* ctx_; execution_unit* ctx_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment