public class Envelope extends java.lang.Object implements Concept, Serializable
FIPAManagementOntology
,
Serialized FormConstructor and Description |
---|
Envelope()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addIntendedReceiver(AID id)
Add an agent identifier to the
intended-receiver
slot collection of this object. |
void |
addProperties(Property p)
Add a property to the
properties slot collection
of this object. |
void |
addStamp(ReceivedObject ro)
Add a
received-object stamp to this message
envelope. |
void |
addTo(AID id)
Add an agent identifier to the
to slot collection
of this object. |
void |
clearAllIntendedReceiver()
Remove all agent identifiers from the
intended-receiver slot collection of this object. |
void |
clearAllProperties()
Remove all properties from the
properties slot
collection of this object. |
void |
clearAllTo()
Remove all agent identifiers from the
to slot
collection of this object. |
java.lang.String |
getAclRepresentation()
Retrieve the
acl-representation slot of this
object. |
Iterator |
getAllIntendedReceiver()
Access all agent identifiers from the
intended
receiver slot collection of this object. |
Iterator |
getAllProperties()
Access all properties from the
properties slot
collection of this object. |
Iterator |
getAllTo()
Access all agent identifiers from the
to slot
collection of this object. |
java.lang.String |
getComments()
Retrieve the
comments slot of this object. |
java.util.Date |
getDate()
Retrieve the
date slot of this object. |
AID |
getFrom()
Retrieve the
from slot of this object. |
java.lang.String |
getPayloadEncoding()
Retrieve the
payload-encoding slot of this object. |
java.lang.Long |
getPayloadLength()
Retrieve the
payload-length slot of this object. |
ReceivedObject |
getReceived()
Retrieve the
received slot of this object. |
ReceivedObject[] |
getStamps()
Access the list of all the stamps.
|
boolean |
removeIntendedReceiver(AID id)
Remove an agent identifier from the
intended-receiver slot collection of this object. |
boolean |
removeProperties(Property p)
Remove a property from the
properties slot
collection of this object. |
boolean |
removeTo(AID id)
Remove an agent identifier from the
to slot
collection of this object. |
void |
setAclRepresentation(java.lang.String r)
Set the
acl-representation slot of this object. |
void |
setComments(java.lang.String c)
Set the
comments slot of this object. |
void |
setDate(java.util.Date d)
Set the
date slot of this object. |
void |
setFrom(AID id)
Set the
from slot of this object. |
void |
setPayloadEncoding(java.lang.String e)
Set the
payload-encoding slot of this object. |
void |
setPayloadLength(java.lang.Long l)
Set the
payload-length slot of this object. |
void |
setReceived(ReceivedObject ro)
Set the
received slot of this object. |
java.lang.String |
toString()
Retrieve a string representation for this platform description.
|
public Envelope()
public void addTo(AID id)
to
slot collection
of this object.id
- The agent identifier to add to the collection.public boolean removeTo(AID id)
to
slot
collection of this object.id
- The agent identifierto remove from the collection.public void clearAllTo()
to
slot
collection of this object.public Iterator getAllTo()
to
slot
collection of this object.public void setFrom(AID id)
from
slot of this object.id
- The agent identifier for the envelope sender.public AID getFrom()
from
slot of this object.from
slot of this
envelope, or null
if no value was set.public void setComments(java.lang.String c)
comments
slot of this object.c
- The string for the envelope comments.public java.lang.String getComments()
comments
slot of this object.comments
slot of this
envelope, or null
if no value was set.public void setAclRepresentation(java.lang.String r)
acl-representation
slot of this object.r
- The string for the ACL representation.public java.lang.String getAclRepresentation()
acl-representation
slot of this
object.acl-representation
slot
of this envelope, or null
if no value was set.public void setPayloadLength(java.lang.Long l)
payload-length
slot of this object.l
- The payload length, in bytes.public java.lang.Long getPayloadLength()
payload-length
slot of this object.payload-length
slot of
this envelope, or null
or a negative value if no value was set.public void setPayloadEncoding(java.lang.String e)
payload-encoding
slot of this object.
This slot can be used to specify a different charset than
the standard one (US-ASCII) in order for instance to support
accentuated characters in the content slot of the ACL message
(e.g. setPayloadEncoding("UTF-8")).e
- The string for the payload encoding.public java.lang.String getPayloadEncoding()
payload-encoding
slot of this object.payload-encoding
slot of
this envelope, or null
if no value was set.public void setDate(java.util.Date d)
date
slot of this object.d
- The envelope date.public java.util.Date getDate()
date
slot of this object.date
slot of this
envelope, or null
if no value was set.public void addIntendedReceiver(AID id)
intended-receiver
slot collection of this object.id
- The agent identifier to add to the collection.public boolean removeIntendedReceiver(AID id)
intended-receiver
slot collection of this object.id
- The agent identifier to remove from the collection.public void clearAllIntendedReceiver()
intended-receiver
slot collection of this object.public Iterator getAllIntendedReceiver()
intended
receiver
slot collection of this object.public void setReceived(ReceivedObject ro)
received
slot of this object.ro
- The received object for the received
slot.public ReceivedObject getReceived()
received
slot of this object.received
slot of this
envelope, or null
if no value was set.public void addStamp(ReceivedObject ro)
received-object
stamp to this message
envelope. This method is used by the ACC to add a new stamp to
the envelope at every routing hop.ro
- The received-object
to add.public ReceivedObject[] getStamps()
received-object
stamps are sorted according to the
routing path, from the oldest to the newest.public void addProperties(Property p)
properties
slot collection
of this object.p
- The property to add to the collection.public boolean removeProperties(Property p)
properties
slot
collection of this object.p
- The property to remove from the collection.public void clearAllProperties()
properties
slot
collection of this object.public Iterator getAllProperties()
properties
slot
collection of this object.public java.lang.String toString()
toString
in class java.lang.Object