|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fipaos.ont.fipa.fipaman.Envelope
This class provides a representation of the FIPA99/2000 envelope (implements XC00067C)
In conformance with the FIPA99/2000 specification slots cannot be overwriten, just overridden.
Constructor Summary | |
Envelope()
Default constructor - creates an empty envelope |
|
Envelope(ACL msg)
Creates an Envelope based upon the given ACL object |
|
Envelope(Envelope env)
Deprecated. Please use clone() instead |
Method Summary | |
void |
addMessageListener(MessageListener ml)
Add a MessageListener to this |
java.lang.Object |
clone()
|
java.lang.Object |
cloneSlot(java.lang.Object slot)
Attempt to clone a value that has been inserted into a slot |
java.lang.String |
getACLRepresentation()
Gets the ACL representation associated with this envelope |
java.lang.String |
getComments()
Gets the comments associated with this Envelope |
UTCTime |
getDate()
Gets the creating date of this Envelope |
java.util.List |
getEncrypted()
Gets details of the encryption used on the content of the envelope |
int |
getErrorCode()
Get the internal error condition for this envelope |
java.util.List |
getIntendedReceiver()
Gets the intended receivers for the message |
java.util.List |
getMessageListeners()
Get list of MessageListeners |
java.lang.String |
getPayloadEncoding()
Gets the payload encoding associated with this Envelope |
int |
getPayloadLength()
Gets the payload length associated with this Envelope |
Received |
getReceived()
Gets details of when the message was received by an entity |
java.util.List |
getReceivers()
Gets a List of the recipients' AID's |
AgentID |
getSender()
Gets the sender of the message |
java.lang.Object |
getSlotValue(java.lang.String slot)
Generic method for retreiving the value assigned to a slot within the envelope |
Envelope |
getSubEnvelope(int x)
Gets a particular sub-envelope |
java.util.List |
getSubEnvelopes()
Returns a list of the sub-envelopes composing this |
TransportBehaviour |
getTransportBehaviour()
Gets the TransportBehviour parameter |
java.util.List |
getTransportsTried()
Returns the transports that have been tried whilst attempting to send this message |
java.util.List |
getUnknownURLsTried()
Returns the URL's that have been tried, but an MTP implementation hasn't been found |
java.util.Set |
getUserSlots()
Returns a list of the names of non-standard slots contained within this Envelope |
boolean |
getViaACC()
Indicates if this should be routed via the ACC |
static void |
main(java.lang.String[] args)
Test-harness |
void |
newSubEnvelope()
Indicates that a new sub-envelope should be started (i.e. |
void |
removeMessageListener(MessageListener ml)
Remove a MessageListener from this |
void |
setACLRepresentation(java.lang.String type)
Sets the ACL representation of this Envelope |
void |
setComments(java.lang.String comments)
Sets the comments associated with this envelope |
void |
setDate(UTCTime utc)
Sets the date of creation for this envelope |
void |
setEncrypted(java.util.List enc)
Sets details of the encryption used on the content of the envelope |
void |
setErrorCode(int code)
Set the internal error condition for this envelope |
void |
setIntendedReceiver(java.util.List aids)
Sets the intended receivers for the message |
void |
setPayloadEncoding(java.lang.String encoding)
Sets the payload encoding associated with this envelope |
void |
setPayloadLength(int length)
Sets the payload length associated with this envelope |
void |
setReceived(Received received)
Sets details of when the message was received by an entity |
void |
setReceivers(java.util.List aids)
Sets the list of receivers for the message |
void |
setSender(AgentID aid)
Sets the sender of the message |
void |
setSlotValue(java.lang.String slot,
java.lang.Object value)
Generic method for adding a value to a slot within the envelope |
void |
setTransportBehaviour(TransportBehaviour behaviour)
Sets the TransportBehviour parameter |
void |
setViaACC(boolean value)
Sets the flag that indicates if the message this encapsulates should be routed via the ACC |
java.lang.String |
toString()
Overrides default toString() method - displays contents of Envelope |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Envelope()
public Envelope(Envelope env)
env
- Envelope to duplicatepublic Envelope(ACL msg)
msg
- ACL to base the Envelope onMethod Detail |
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.Object cloneSlot(java.lang.Object slot)
public void addMessageListener(MessageListener ml)
public void removeMessageListener(MessageListener ml)
public java.util.List getMessageListeners()
public void newSubEnvelope()
public java.util.List getSubEnvelopes()
public Envelope getSubEnvelope(int x)
x
- The sub-envelope number to getpublic void setACLRepresentation(java.lang.String type)
type
- The type of the ACL representation (i.e. RDF)public java.lang.String getACLRepresentation()
public void setComments(java.lang.String comments)
comments
- Comment to addpublic java.lang.String getComments()
public void setPayloadEncoding(java.lang.String encoding)
public java.lang.String getPayloadEncoding()
public void setPayloadLength(int length)
length
- of payload (or -1 for none)public int getPayloadLength()
public void setDate(UTCTime utc)
utc
- The UTCTime representing the creation time of the envelopepublic UTCTime getDate()
public void setEncrypted(java.util.List enc)
enc
- Details of encryption appliedpublic java.util.List getEncrypted()
public void setReceived(Received received)
received
- Description of the time & entitypublic Received getReceived()
public void setSender(AgentID aid)
aid
- The AID belonging to the sending Agentpublic AgentID getSender()
public void setReceivers(java.util.List aids)
aids
- A List of AgentID's belonging to the recipients of the messagepublic java.util.List getReceivers()
public void setIntendedReceiver(java.util.List aids)
aids
- A List of AgentID'spublic java.util.List getIntendedReceiver()
public void setTransportBehaviour(TransportBehaviour behaviour)
behaviour
- A description of the behaviour to usepublic TransportBehaviour getTransportBehaviour()
public void setErrorCode(int code)
Set the internal error condition for this envelope
N.B. This is not part of the FIPA specification, but servers as a mechanism for "tagging" messages with "exception" codes at the transport layer
code
- public int getErrorCode()
N.B. This is not part of the FIPA specification, but servers as a mechanism for "tagging" messages with "exception" codes at the transport layer
public void setViaACC(boolean value)
value
- If true, indicates this message should be routed via the ACCpublic boolean getViaACC()
public java.util.List getTransportsTried()
public java.util.List getUnknownURLsTried()
public void setSlotValue(java.lang.String slot, java.lang.Object value)
slot
- Slot namevalue
- Valuepublic java.lang.Object getSlotValue(java.lang.String slot)
slot
- Slot namepublic java.util.Set getUserSlots()
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |