A Stomp-level message frame that encloses all messages to and from the broker.
More...
#include <src/main/activemq/wireformat/stomp/StompFrame.h>
A Stomp-level message frame that encloses all messages to and from the broker.
◆ StompFrame()
| activemq::wireformat::stomp::StompFrame::StompFrame |
( |
| ) |
|
◆ ~StompFrame()
| virtual activemq::wireformat::stomp::StompFrame::~StompFrame |
( |
| ) |
|
|
virtual |
◆ clone()
| StompFrame* activemq::wireformat::stomp::StompFrame::clone |
( |
| ) |
const |
Clonse this message exactly, returns a new instance that the caller is required to delete.
- Returns
- new copy of this message
◆ copy()
| void activemq::wireformat::stomp::StompFrame::copy |
( |
const StompFrame * |
src | ) |
|
Copies the contents of the passed Frame to this one.
- Parameters
-
◆ fromStream()
Reads a Stop Frame from a DataInputStream in the Stomp Wire format.
- Parameters
-
| stream | - The stream to read the Frame from. |
- Exceptions
-
| IOException | if an error occurs while writing the Frame. |
◆ getBody() [1/2]
| const std::vector<unsigned char>& activemq::wireformat::stomp::StompFrame::getBody |
( |
| ) |
const |
|
inline |
Accessor for the body data of this frame.
- Returns
- char pointer to body data
◆ getBody() [2/2]
| std::vector<unsigned char>& activemq::wireformat::stomp::StompFrame::getBody |
( |
| ) |
|
|
inline |
Non-const version of the body accessor.
◆ getBodyLength()
| std::size_t activemq::wireformat::stomp::StompFrame::getBodyLength |
( |
| ) |
const |
|
inline |
Return the number of bytes contained in this frames body.
- Returns
- Body bytes length.
◆ getCommand()
| const std::string& activemq::wireformat::stomp::StompFrame::getCommand |
( |
| ) |
const |
|
inline |
Accessor for this frame's command field.
◆ getProperties() [1/2]
Gets access to the header properties for this frame.
- Returns
- the Properties object owned by this Frame
◆ getProperties() [2/2]
◆ getProperty()
| std::string activemq::wireformat::stomp::StompFrame::getProperty |
( |
const std::string & |
name, |
|
|
const std::string & |
fallback = "" |
|
) |
| const |
|
inline |
Gets a property from this Frame's properties and returns it, or the default value given.
- Parameters
-
| name | - The name of the property to lookup |
| fallback | - The default value to return if this value isn't set |
- Returns
- string value of the property asked for.
References decaf::util::Properties::getProperty().
◆ hasProperty()
| bool activemq::wireformat::stomp::StompFrame::hasProperty |
( |
const std::string & |
name | ) |
const |
|
inline |
◆ removeProperty()
| std::string activemq::wireformat::stomp::StompFrame::removeProperty |
( |
const std::string & |
name | ) |
|
|
inline |
Gets and remove the property specified, if the property is not set, this method returns the empty string.
- Parameters
-
| name | - the Name of the property to get and return. |
References decaf::util::Properties::getProperty().
◆ setBody()
| void activemq::wireformat::stomp::StompFrame::setBody |
( |
const unsigned char * |
bytes, |
|
|
std::size_t |
numBytes |
|
) |
| |
Sets the body data of this frame as a byte sequence.
- Parameters
-
| bytes | The byte buffer to be set in the body. |
| numBytes | The number of bytes in the buffer. |
◆ setCommand()
| void activemq::wireformat::stomp::StompFrame::setCommand |
( |
const std::string & |
cmd | ) |
|
|
inline |
Sets the command for this stomp frame.
- Parameters
-
| cmd | command The command to be set. |
◆ setProperty()
| void activemq::wireformat::stomp::StompFrame::setProperty |
( |
const std::string & |
name, |
|
|
const std::string & |
value |
|
) |
| |
|
inline |
Sets the property given to the value specified in this Frame's Properties.
- Parameters
-
| name | - Name of the property. |
| value | - Value to set the property to. |
References decaf::util::Properties::setProperty().
◆ toStream()
Writes this Frame to an OuputStream in the Stomp Wire Format.
- Parameters
-
| stream | - The stream to write the Frame to. |
- Exceptions
-
| IOException | if an error occurs while reading the Frame. |
The documentation for this class was generated from the following file: