Package madkit.message
Class ACLMessage
java.lang.Object
madkit.kernel.Message
madkit.message.ActMessage
madkit.message.ACLMessage
- All Implemented Interfaces:
Serializable,Cloneable
This class describes an ACL message. It provides accessors for all
message parameters defined in the FIPA 97 specification part 2.
Note that the :receiver and :sender are automatically mapped to the
MaDKit AgentAddress.
- Since:
- MaDKit 1.0
- Version:
- 1.1
- Author:
- Ol. Gutknecht, J. Ferber
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intconstant identifying the FIPA performativestatic final Stringstatic final intconstant identifying the FIPA performativestatic final Stringstatic final intconstant identifying the FIPA performativestatic final Stringstatic final intconstant identifying the FIPA performativestatic final Stringstatic final intconstant identifying the FIPA performativestatic final Stringstatic final intconstant identifying the FIPA performativestatic final Stringstatic final intconstant identifying the FIPA performativestatic final Stringstatic final intconstant identifying the FIPA performativestatic final intconstant identifying the FIPA performativestatic final Stringstatic final intconstant identifying the FIPA performativestatic final Stringstatic final Stringstatic final intconstant identifying the FIPA performativestatic final Stringstatic final intconstant identifying the FIPA performativestatic final Stringstatic final intconstant identifying the FIPA performativestatic final Stringstatic final intconstant identifying the FIPA performativestatic final Stringstatic final intconstant identifying the FIPA performativestatic final Stringstatic final intconstant identifying the FIPA performativestatic final Stringstatic final intconstant identifying the FIPA performativestatic final Stringstatic final intconstant identifying the FIPA performativestatic final Stringstatic final intconstant identifying the FIPA performativestatic final Stringstatic final intconstant identifying the FIPA performativestatic final Stringstatic final intconstant identifying the FIPA performativestatic final Stringstatic final intconstant identifying the FIPA performativestatic final Stringstatic final intconstant identifying an unknown performativeFields inherited from class madkit.message.ActMessage
action, fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for ACLMessage classACLMessage(int perf, String cont) ACLMessage(String actType) Constructor for ACLMessage classACLMessage(String actType, String cont) Constructor for ACLMessage class -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a value to:receiverslot.voidaddReplyTo(AgentAddress dest) Adds a value to:reply-toslot.voidRemoves all values from:receiverslot.voidRemoves all values from:reply_toslot.create a new ACLMessage that is a reply to this message.getAct()Return the list of receivers..booleanRemoves a value from:receiverslot.booleanremoveReplyTo(AgentAddress dest) Removes a value from:reply_toslot.voidsetContent(String s) voidvoidvoidvoidvoidvoidvoidvoidvoidsetReplyBy(String s) voidsetReplyBy(Date s) voidtoString()Methods inherited from class madkit.message.ActMessage
getAction, getContent, getFieldValue, getKeys, getObject, setField, setObjectMethods inherited from class madkit.kernel.Message
clone, getConversationID, getReceiver, getSender
-
Field Details
-
ACCEPT_PROPOSAL
public static final int ACCEPT_PROPOSALconstant identifying the FIPA performative- See Also:
-
AGREE
public static final int AGREEconstant identifying the FIPA performative- See Also:
-
CANCEL
public static final int CANCELconstant identifying the FIPA performative- See Also:
-
CFP
public static final int CFPconstant identifying the FIPA performative- See Also:
-
CONFIRM
public static final int CONFIRMconstant identifying the FIPA performative- See Also:
-
DISCONFIRM
public static final int DISCONFIRMconstant identifying the FIPA performative- See Also:
-
FAILURE
public static final int FAILUREconstant identifying the FIPA performative- See Also:
-
INFORM
public static final int INFORMconstant identifying the FIPA performative- See Also:
-
INFORM_IF
public static final int INFORM_IFconstant identifying the FIPA performative- See Also:
-
INFORM_REF
public static final int INFORM_REFconstant identifying the FIPA performative- See Also:
-
NOT_UNDERSTOOD
public static final int NOT_UNDERSTOODconstant identifying the FIPA performative- See Also:
-
PROPOSE
public static final int PROPOSEconstant identifying the FIPA performative- See Also:
-
QUERY_IF
public static final int QUERY_IFconstant identifying the FIPA performative- See Also:
-
QUERY_REF
public static final int QUERY_REFconstant identifying the FIPA performative- See Also:
-
REFUSE
public static final int REFUSEconstant identifying the FIPA performative- See Also:
-
REJECT_PROPOSAL
public static final int REJECT_PROPOSALconstant identifying the FIPA performative- See Also:
-
REQUEST
public static final int REQUESTconstant identifying the FIPA performative- See Also:
-
REQUEST_WHEN
public static final int REQUEST_WHENconstant identifying the FIPA performative- See Also:
-
REQUEST_WHENEVER
public static final int REQUEST_WHENEVERconstant identifying the FIPA performative- See Also:
-
SUBSCRIBE
public static final int SUBSCRIBEconstant identifying the FIPA performative- See Also:
-
PROXY
public static final int PROXYconstant identifying the FIPA performative- See Also:
-
PROPAGATE
public static final int PROPAGATEconstant identifying the FIPA performative- See Also:
-
UNKNOWN
public static final int UNKNOWNconstant identifying an unknown performative- See Also:
-
ACCEPT_PROPOSAL_STRING
- See Also:
-
AGREE_STRING
- See Also:
-
CANCEL_STRING
- See Also:
-
CFP_STRING
- See Also:
-
CONFIRM_STRING
- See Also:
-
DISCONFIRM_STRING
- See Also:
-
FAILURE_STRING
- See Also:
-
INFORM_STRING
- See Also:
-
INFORM_IF_STRING
- See Also:
-
INFORM_REF_STRING
- See Also:
-
NOT_UNDERSTOOD_STRING
- See Also:
-
PROPOSE_STRING
- See Also:
-
QUERY_IF_STRING
- See Also:
-
QUERY_REF_STRING
- See Also:
-
REFUSE_STRING
- See Also:
-
REJECT_PROPOSAL_STRING
- See Also:
-
REQUEST_STRING
- See Also:
-
REQUEST_WHEN_STRING
- See Also:
-
REQUEST_WHENEVER_STRING
- See Also:
-
SUBSCRIBE_STRING
- See Also:
-
PROXY_STRING
- See Also:
-
PROPAGATE_STRING
- See Also:
-
performatives
-
-
Constructor Details
-
ACLMessage
public ACLMessage()Default constructor for ACLMessage class -
ACLMessage
Constructor for ACLMessage class -
ACLMessage
Constructor for ACLMessage class -
ACLMessage
-
-
Method Details
-
getAct
-
setContent
- Overrides:
setContentin classActMessage
-
getPerformative
-
setPerformative
-
addReceiver
Adds a value to:receiverslot. Warning: no checks are made to validate the slot value.- Parameters:
r- The value to add to the slot value set.
-
getReceivers
Return the list of receivers.. -
removeReceiver
Removes a value from:receiverslot. Warning: no checks are made to validate the slot value.- Parameters:
r- The value to remove from the slot value set.- Returns:
- true if the AgentAddress has been found and removed, false otherwise
-
clearAllReceiver
public void clearAllReceiver()Removes all values from:receiverslot. Warning: no checks are made to validate the slot value. -
addReplyTo
Adds a value to:reply-toslot. Warning: no checks are made to validate the slot value.- Parameters:
dest- The value to add to the slot value set.
-
removeReplyTo
Removes a value from:reply_toslot. Warning: no checks are made to validate the slot value.- Parameters:
dest- The value to remove from the slot value set.- Returns:
- true if the AgentAddress has been found and removed, false otherwise
-
clearAllReplyTo
public void clearAllReplyTo()Removes all values from:reply_toslot. Warning: no checks are made to validate the slot value. -
getEnvelope
-
setEnvelope
-
getConversationIDentifier
-
setConversationID
-
getProtocol
-
setProtocol
-
getReplyWith
-
setReplyWith
-
getReplyBy
-
setReplyBy
-
setReplyBy
-
getInReplyTo
- Overrides:
getInReplyToin classActMessage
-
setInReplyTo
- Overrides:
setInReplyToin classActMessage
-
getLanguage
-
setLanguage
-
getEncoding
-
setEncoding
-
getOntology
-
setOntology
-
toString
-
createReply
create a new ACLMessage that is a reply to this message. In particular, it sets the following parameters of the new message: receiver, language, ontology, protocol, conversation-id, in-reply-to, reply-with. The programmer needs to set the communicative-act and the content. Of course, if he wishes to do that, he can reset any of the fields.- Returns:
- the ACLMessage to send as a reply
-