handler_impl.h 655 B

1234567891011121314151617181920212223
  1. #pragma once
  2. #include "handler.h"
  3. #include "local_flags.h"
  4. #include "session.h"
  5. namespace NBus {
  6. template <typename U /* <: TBusMessage */>
  7. EMessageStatus TOnMessageContext::SendReplyAutoPtr(TAutoPtr<U>& response) {
  8. return Session->SendReplyAutoPtr(Ident, response);
  9. }
  10. inline EMessageStatus TOnMessageContext::SendReplyMove(TBusMessageAutoPtr response) {
  11. return SendReplyAutoPtr(response);
  12. }
  13. inline void TOnMessageContext::AckMessage(TBusIdentity& ident) {
  14. Y_ABORT_UNLESS(Ident.LocalFlags == NPrivate::MESSAGE_IN_WORK);
  15. Y_ABORT_UNLESS(ident.LocalFlags == 0);
  16. Ident.Swap(ident);
  17. }
  18. }