AWS SDK for C++
1.8.186
AWS SDK for C++
|
#include <EventMessage.h>
Public Member Functions | |
void | Reset () |
void | SetTotalLength (size_t length) |
size_t | GetTotalLength () const |
void | SetHeadersLength (size_t length) |
size_t | GetHeadersLength () const |
void | SetPayloadLength (size_t length) |
size_t | GetPayloadLength () const |
void | InsertEventHeader (const Aws::String &headerName, const EventHeaderValue &eventHeaderValue) |
const Aws::Utils::Event::EventHeaderValueCollection & | GetEventHeaders () const |
void | WriteEventPayload (const unsigned char *data, size_t length) |
void | WriteEventPayload (const Aws::Vector< unsigned char > &bits) |
void | WriteEventPayload (const Aws::String &bits) |
Aws::Vector< unsigned char > && | GetEventPayloadWithOwnership () |
const Aws::Vector< unsigned char > & | GetEventPayload () const |
Aws::Vector< unsigned char > & | GetEventPayload () |
Aws::String | GetEventPayloadAsString () |
Static Public Member Functions | |
static MessageType | GetMessageTypeForName (const Aws::String &name) |
static Aws::String | GetNameForMessageType (MessageType value) |
static ContentType | GetContentTypeForName (const Aws::String &name) |
static Aws::String | GetNameForContentType (ContentType value) |
A typical message in event stream consists of two parts: Prelude and Data, as well as the prelude CRC and message CRC. Prelude consists of total byte length and headers byte length. Data consists of headers and payload.
Definition at line 29 of file EventMessage.h.
|
strong |
Enumerator | |
---|---|
UNKNOWN | |
APPLICATION_OCTET_STREAM | |
APPLICATION_JSON | |
TEXT_PLAIN |
Definition at line 40 of file EventMessage.h.
|
strong |
Enumerator | |
---|---|
UNKNOWN | |
EVENT | |
REQUEST_LEVEL_ERROR | |
REQUEST_LEVEL_EXCEPTION |
Definition at line 32 of file EventMessage.h.
|
static |
|
inline |
Definition at line 92 of file EventMessage.h.
|
inline |
Definition at line 105 of file EventMessage.h.
|
inline |
Definition at line 104 of file EventMessage.h.
|
inline |
Convert byte array of the payload to string without transferring ownership.
Definition at line 109 of file EventMessage.h.
|
inline |
Get the byte array of the payload with transferring ownership.
Definition at line 103 of file EventMessage.h.
|
inline |
Definition at line 76 of file EventMessage.h.
|
static |
|
static |
|
static |
|
inline |
Definition at line 82 of file EventMessage.h.
|
inline |
Definition at line 69 of file EventMessage.h.
|
inline |
Set/get event headers.
Definition at line 87 of file EventMessage.h.
void Aws::Utils::Event::Message::Reset | ( | ) |
Clean up the message, including the metadata, headers and payload received.
|
inline |
Get/set the length of the headers. Each header consists of: header name byte-length(1 byte) + header name + header value type(1 byte) + header value.
Definition at line 75 of file EventMessage.h.
|
inline |
Get/set the length of payload.
Definition at line 81 of file EventMessage.h.
|
inline |
Get/set the total length of this message: prelude(8 bytes) + prelude CRC(4 bytes) + Data(headers length + payload length) + message CRC(4 bytes).
Definition at line 63 of file EventMessage.h.
void Aws::Utils::Event::Message::WriteEventPayload | ( | const Aws::String & | bits | ) |
void Aws::Utils::Event::Message::WriteEventPayload | ( | const Aws::Vector< unsigned char > & | bits | ) |
void Aws::Utils::Event::Message::WriteEventPayload | ( | const unsigned char * | data, |
size_t | length | ||
) |
Set event payload.