diff options
Diffstat (limited to 'src/mongo/rpc/factory.h')
-rw-r--r-- | src/mongo/rpc/factory.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mongo/rpc/factory.h b/src/mongo/rpc/factory.h index 7de92664b69..2776ffacc47 100644 --- a/src/mongo/rpc/factory.h +++ b/src/mongo/rpc/factory.h @@ -41,8 +41,10 @@ namespace mongo { class Message; namespace rpc { +class ReplyBuilderInterface; class ReplyInterface; class RequestBuilderInterface; +class RequestInterface; /** * Returns the appropriate concrete RequestBuilder. Throws if one cannot be chosen. @@ -56,5 +58,16 @@ std::unique_ptr<RequestBuilderInterface> makeRequestBuilder(ProtocolSet clientPr */ std::unique_ptr<ReplyInterface> makeReply(const Message* unownedMessage); +/** + * Returns the appropriate concrete Request according to the contents of the message. + * Throws if one cannot be chosen. + */ +std::unique_ptr<RequestInterface> makeRequest(const Message* unownedMessage); + +/** + * Returns the appropriate concrete ReplyBuilder. + */ +std::unique_ptr<ReplyBuilderInterface> makeReplyBuilder(Protocol protocol); + } // namespace rpc } // namespace mongo |