aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/messagebus/handler_impl.h
blob: f260767b475a2eb3e1f9160998a86e33e20cc9ac (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once 
 
#include "handler.h"
#include "local_flags.h"
#include "session.h" 
 
namespace NBus { 
    template <typename U /* <: TBusMessage */>
    EMessageStatus TOnMessageContext::SendReplyAutoPtr(TAutoPtr<U>& response) {
        return Session->SendReplyAutoPtr(Ident, response);
    }
 
    inline EMessageStatus TOnMessageContext::SendReplyMove(TBusMessageAutoPtr response) {
        return SendReplyAutoPtr(response);
    }
 
    inline void TOnMessageContext::AckMessage(TBusIdentity& ident) {
        Y_VERIFY(Ident.LocalFlags == NPrivate::MESSAGE_IN_WORK);
        Y_VERIFY(ident.LocalFlags == 0);
        Ident.Swap(ident);
    }
 
}