3#ifndef ICE_OUTGOING_RESPONSE_H
4#define ICE_OUTGOING_RESPONSE_H
7#include "Ice/ReplyStatus.h"
8#include "MarshaledResult.h"
9#include "OutputStream.h"
62 [[nodiscard]]
const Current&
current() const noexcept {
return _current.get(); }
68 [[nodiscard]]
const std::string&
exceptionId() const noexcept {
return _exceptionId; }
73 [[nodiscard]]
const std::string&
exceptionDetails() const noexcept {
return _exceptionDetails; }
85 [[nodiscard]] std::int32_t
size() const noexcept;
88 std::reference_wrapper<const
Current> _current;
89 std::
string _exceptionId;
90 std::
string _exceptionDetails;
103 std::optional<
FormatType> format = std::nullopt) noexcept;
119 std::pair<const std::
byte*, const std::
byte*> encapsulation,
120 const
Current& current) noexcept;
const Current & current() const noexcept
Gets the Current object of this response.
const std::string & exceptionId() const noexcept
Gets the exception ID of the response.
OutgoingResponse & operator=(OutgoingResponse &&other) noexcept=default
Move assignment operator.
OutgoingResponse(OutputStream outputStream, const Current ¤t) noexcept
Constructs an OutgoingResponse object with ReplyStatus::Ok.
OutgoingResponse(ReplyStatus replyStatus, std::string exceptionId, std::string exceptionDetails, OutputStream outputStream, const Current ¤t) noexcept
Constructs an OutgoingResponse object.
ReplyStatus replyStatus() const noexcept
Gets the reply status of the response.
const std::string & exceptionDetails() const noexcept
Gets the full details of the exception marshaled into the response.
OutputStream & outputStream() noexcept
Gets the output stream buffer of the response.
std::int32_t size() const noexcept
Gets the number of bytes in the response.
OutgoingResponse(OutgoingResponse &&other) noexcept=default
Move constructor.
Represents the response to an incoming request.
Represents a byte buffer used for marshaling data using the Slice encoding.
OutgoingResponse makeOutgoingResponse(const std::function< void(OutputStream *)> &marshal, const Current ¤t, std::optional< FormatType > format=std::nullopt) noexcept
Creates an OutgoingResponse object with ReplyStatus::Ok.
OutgoingResponse makeEmptyOutgoingResponse(const Current ¤t) noexcept
Creates an OutgoingResponse object with ReplyStatus::Ok and an empty payload.
FormatType
Specifies the format for marshaling classes and exceptions with the Slice 1.1 encoding.
ReplyStatus
Represents the status of a reply.
@ Ok
The dispatch completed successfully.
Provides information about an incoming request being dispatched.