public interface ModifiableMessage extends Message
Modifier and Type | Method and Description |
---|---|
void |
addReceiver(AgentIdentifier receiver)
Adds a receiver of the message.
|
void |
addReplyTo(AgentIdentifier replyTo)
Adds a reply-to of the message.
|
void |
addUserParameter(UserParameter parameter)
Adds a user-defined parameter without value of the message.
|
void |
addUserParameter(UserParameter parameter,
String value)
Adds a user-defined parameter of the message.
|
void |
clearReceivers()
Deletes all receivers of the message.
|
void |
clearReplyTos()
Deletes all reply-tos of the message.
|
void |
clearUserParameters()
Deletes all user-defined parameters of the message.
|
ModifiableMessage |
clone()
Clones this modifiable message.
|
boolean |
removeReceiver(AgentIdentifier receiver)
Removes a receiver of the message.
|
boolean |
removeReplyTo(AgentIdentifier replyTo)
Removes a reply-to of the message.
|
String |
removeUserParameter(UserParameter parameter)
Removes a user-defined parameter of the message based on its key.
|
void |
setContent(String content)
Sets the content of the message.
|
void |
setContentObject(Serializable object)
Sets the content of the message to the serializable object provided.
|
void |
setContentObjectBytes(byte[] bytes)
Sets the content of the message to the byte-serializabled object
provided.
|
void |
setConversationID(UniqueIdentifier conversationID)
Sets the conversation-id of the message (part of the conversation
control).
|
void |
setEncoding(EncodingIdentifier encoding)
Sets the encoding of the message (part of the content description).
|
void |
setInReplyTo(UniqueIdentifier inReplyTo)
Sets the in-reply-to of the message (part of the conversation control).
|
void |
setLanguage(LanguageIdentifier language)
Sets the language of the message (part of the content description).
|
void |
setOntology(OntologyIdentifier ontology)
Sets the ontology of the message (part of the content description).
|
void |
setPerformative(CommunicativeAct performative)
Sets the type of communicative act.
|
void |
setProtocol(ProtocolIdentifier protocol)
Sets the protocol of the message (part of the conversation control).
|
void |
setReplyBy(Timestamp replyBy)
Sets the reply-by of the message (part of the conversation control).
|
void |
setReplyWith(UniqueIdentifier replyWith)
Sets the reply-with of the message (part of the conversation control).
|
void |
unsetContent()
Unsets the content of the message.
|
void |
unsetContentObject()
Unsets the content object of the message.
|
void |
unsetConversationID()
Unsets the conversation-id of the message.
|
void |
unsetEncoding()
Unsets the encoding of the message.
|
void |
unsetInReplyTo()
Unsets the in-reply-to of the message.
|
void |
unsetLanguage()
Unsets the language of the message.
|
void |
unsetOntology()
Unsets the ontology of the message.
|
void |
unsetProtocol()
Unsets the protocol of the message.
|
void |
unsetReplyBy()
Unsets the reply-by of the message.
|
void |
unsetReplyWith()
Unsets the reply-with of the message.
|
getContent, getContentObject, getContentObjectBytes, getConversationID, getEncoding, getInReplyTo, getLanguage, getOntology, getPerformative, getProtocol, getReceivers, getReplyBy, getReplyTos, getReplyWith, getSender, getUserParameter, getUserParameters, hasUserParameter, toString
compareTo
void setPerformative(CommunicativeAct performative)
performative
- the type of communicative actvoid addReceiver(AgentIdentifier receiver)
receiver
- a receiver of the messageboolean removeReceiver(AgentIdentifier receiver)
receiver
- a receiver of the messagetrue
if the receiver was on the set of receivers,
false
otherwisevoid clearReceivers()
void addReplyTo(AgentIdentifier replyTo)
replyTo
- a reply-to of the messageboolean removeReplyTo(AgentIdentifier replyTo)
replyTo
- a reply-to of the messagetrue
if the reply-to was on the set of reply-tos,
false
otherwisevoid clearReplyTos()
void setContent(String content)
content
- the content of the messagevoid unsetContent()
void setContentObject(Serializable object) throws IOException
object
- the content object of the messageIOException
- if the object cannot be serializedvoid setContentObjectBytes(byte[] bytes) throws UnreadableException
bytes
- the byte-serializabled content object of the messageUnreadableException
- if the object cannot be deserializedvoid unsetContentObject()
void setLanguage(LanguageIdentifier language)
language
- the language of the messagevoid unsetLanguage()
void setEncoding(EncodingIdentifier encoding)
encoding
- the encoding of the messagevoid unsetEncoding()
void setOntology(OntologyIdentifier ontology)
ontology
- the ontology of the messagevoid unsetOntology()
void setProtocol(ProtocolIdentifier protocol)
protocol
- the protocol of the messagevoid unsetProtocol()
void setConversationID(UniqueIdentifier conversationID)
conversationID
- the conversation-id of the messagevoid unsetConversationID()
void setReplyWith(UniqueIdentifier replyWith)
replyWith
- the reply-with of the messagevoid unsetReplyWith()
void setInReplyTo(UniqueIdentifier inReplyTo)
inReplyTo
- the in-reply-to of the messagevoid unsetInReplyTo()
void setReplyBy(Timestamp replyBy)
replyBy
- the reply-by of the messagevoid unsetReplyBy()
void addUserParameter(UserParameter parameter)
parameter
- the key of the user-defined parameter of the messagevoid addUserParameter(UserParameter parameter, String value)
parameter
- the user-defined parameter of the messagevalue
- the value of the user-defined parameter of the messageString removeUserParameter(UserParameter parameter) throws NoSuchElementException
parameter
- the user-defined parameter to be removedNoSuchElementException
void clearUserParameters()
ModifiableMessage clone()
Copyright © Aimpulse Intelligent Systems GmbH
All rights reserved.