|
fipa_acl
1.4
|
ACLMessage envelope (also typed as fipa::acl::Letter) includes the base envelope and updated fields, along with the actual payload data that is wrapped by this envelope. More...
#include <acl_envelope.h>
Public Member Functions | |
| ACLEnvelope () | |
| ACLEnvelope (const ACLMessage &msg, const fipa::acl::representation::Type &format) | |
| void | insert (const ACLMessage &msg, const fipa::acl::representation::Type &format) |
| const ACLBaseEnvelopeList & | getExtraEnvelopes () const |
| void | addExtraEnvelope (const ACLBaseEnvelope &envelope) |
| void | setExtraEnvelopes (const ACLBaseEnvelopeList &envelopes) |
| const ACLBaseEnvelope & | getBaseEnvelope () const |
| void | setBaseEnvelope (const ACLBaseEnvelope &envelope) |
| ACLBaseEnvelope | flattened () const |
| AgentIDList | getDeliveryPath () const |
| std::string | getDeliveryPathString () const |
| void | setPayload (const std::string &payload) |
| const std::string & | getPayload () const |
| fipa::acl::ACLMessage | getACLMessage () const |
| void | stamp (const fipa::acl::AgentID &id) |
| bool | hasStamp (fipa::acl::AgentID id) const |
| ACLEnvelope | createDedicatedEnvelope (const AgentID &receiverId) const |
Friends | |
| class | EnvelopeFormat |
ACLMessage envelope (also typed as fipa::acl::Letter) includes the base envelope and updated fields, along with the actual payload data that is wrapped by this envelope.
Definition at line 349 of file acl_envelope.h.
| fipa::acl::ACLEnvelope::ACLEnvelope | ( | ) |
| fipa::acl::ACLEnvelope::ACLEnvelope | ( | const ACLMessage & | msg, |
| const fipa::acl::representation::Type & | format | ||
| ) |
Creates an envelope for an acl message. Note the the acl message will be encoded according to the given representation format
Note, that the fields to, from, intended-receivers, acl-representation, payload-length, payload-encoding and date are set. All others have to be set explicitly (also see stamp). Intended-receivers is initially same as 'to' and should only be modified by a transport service to organize message delivery
| msg | ACLMessage will shall be wrapped by this envelope |
| format | The message format this message will be encoded in for transport |
Definition at line 239 of file acl_envelope.cpp.
|
inline |
Add an extra envelope to overwrite existing parameters Append the most recent extra envelope
Definition at line 417 of file acl_envelope.h.
| ACLEnvelope fipa::acl::ACLEnvelope::createDedicatedEnvelope | ( | const AgentID & | receiverId | ) | const |
Create a dedicated letter, i.e. where the intended-receivers field contains only a single receiver
Definition at line 361 of file acl_envelope.cpp.
|
inline |
Retrieve the fully merged envelope Starting with the base envelope each extra envelope is applied as an overlay
Definition at line 444 of file acl_envelope.h.
| fipa::acl::ACLMessage fipa::acl::ACLEnvelope::getACLMessage | ( | ) | const |
Retrieve the contained message if possible.
| std::runtime_error | if the acl message could not be extracted |
Definition at line 305 of file acl_envelope.cpp.
|
inline |
| AgentIDList fipa::acl::ACLEnvelope::getDeliveryPath | ( | ) | const |
Retrieve the delivery path from the received object in base and extra envelopes, i.e. will not include the current hop (unless stamped)
Definition at line 267 of file acl_envelope.cpp.
| std::string fipa::acl::ACLEnvelope::getDeliveryPathString | ( | ) | const |
Retrieve the delivery path as a comma separated list of agent names in time order
Definition at line 289 of file acl_envelope.cpp.
|
inline |
Get all extra envelopes. Extra envelope represent an overlay to the base envelope, This overlay mechanism is used, since information must not be discarded.
Definition at line 411 of file acl_envelope.h.
|
inline |
Get the payload which is wrapped by this envelope
Definition at line 473 of file acl_envelope.h.
| bool fipa::acl::ACLEnvelope::hasStamp | ( | fipa::acl::AgentID | id | ) | const |
Check whether the letter has already been stamped Iterates over all received objects for testing
Definition at line 337 of file acl_envelope.cpp.
| void fipa::acl::ACLEnvelope::insert | ( | const ACLMessage & | msg, |
| const fipa::acl::representation::Type & | format | ||
| ) |
Insert a message to this envelope using a specific representation Existing settings will be overwritten
| msg | Message to be set |
| format | Format to be applied to the message |
Definition at line 244 of file acl_envelope.cpp.
|
inline |
Set the base envelope
| envelope | Base envelope to set |
Definition at line 436 of file acl_envelope.h.
|
inline |
Set all extra envelopes Overwrites the existing set of extra envelopes
| envelopes | List of base envelopes |
Definition at line 424 of file acl_envelope.h.
|
inline |
Set the payload which is wrapped by this envelope as byte get If you are using this function, make sure to set the corresponding encoding of the payload
| payload | representing an acl message |
Definition at line 467 of file acl_envelope.h.
| void fipa::acl::ACLEnvelope::stamp | ( | const fipa::acl::AgentID & | id | ) |
Stamp a letter with a given agent id This creates a new received object and attaches it to an extra envelope
The mandatory fields 'by' and 'date' are set. The optional field 'id' is set.
Definition at line 321 of file acl_envelope.cpp.
|
friend |
Definition at line 351 of file acl_envelope.h.
1.8.11