fipaos.ont.fipa
Class ACL


public class ACL
implements Cloneable, Serializable

This class provides the representation of an ACL communication within an Agent.

Implements XC00061D & XC00070F (except for support for ":encoding" field)


Field Summary
 final static intBYTELENGTH_ENCODING
           
 final static StringFIPA_OS_SERIALIZATION
          ACL Encoding using Java Serialisation
 final static StringFIPA00069
          ACL Encoding name as defined in FIPA00069
 final static StringFIPA00070
          ACL Encoding name as defined in FIPA00070
 final static StringFIPA00071
          ACL Encoding name as defined in FIPA00071
 final static ListRESERVED_SLOT_NAMES
          Reserved slot names in a List for convenience
 final static intSTRINGLITERAL_ENCODING
          Content encoding constants - see FIPA ACL spec.

Constructor Summary
ACL()
          Creates an empty ACL communication

Method Summary
 voidaddReceiverAID(AgentID aid)
           
 voidaddReplyToAID(AgentID aid)
           
 Objectclone()
           
 StringgetContentEncoding()
           
 ObjectgetContentObject()
           
 ObjectgetContentObject(boolean do_decode)
          Alternative getContentObject() - used by the ACL parser to get the content un-changed
 StringgetConversationID()
           
 intgetEncoding()
          Indicates current/prefered content encoding type
For use by ACL Parser
 StringgetInReplyTo()
           
 StringgetLanguage()
           
 StringgetOntology()
           
 StringgetPerformative()
           
 StringgetProtocol()
           
 AgentIDgetReceiverAID()
          Get just the first AID of the receivers field, if present
 ListgetReceiverAIDs()
           
 UTCContainergetReplyByUTC()
           
 ListgetReplyToAIDs()
           
 StringgetReplyWith()
           
 AgentIDgetSenderAID()
           
 StringgetUserSlot(String slot_name)
          Get the value associated with a user-defined slot
 SetgetUserSlots()
          Gets a list of the user-defined slot names for this ACL
 booleanisBracketsStripped()
          Indicates if brackets have been stripped from SL content expression
For use by ACL Parser
 booleanisEncoded()
          Indicates if content has been encoded (as either BYTELENGTH or STRINGLITERAL)
For use by ACL Parser
 static voidmain(String[] args)
           
 voidsetContentEncoding(String encoding)
           
 voidsetContentObject(Object content)
           
 voidsetContentObject(Object content, int encode)
          Sets the content, optionally encoding the content
as the specified type (see FIPA specification), if it is Stringified
 voidsetContentObjectACLParser(String s)
          Method to be invoked by the ACLParser to set the content -
causes outer brakets to be stripped from SL
 voidsetConversationID(String conv_id)
           
 voidsetInReplyTo(String in_reply_to)
           
 voidsetLanguage(String lang)
           
 voidsetOntology(String ont)
           
 voidsetPerformative(String perf)
           
 voidsetProtocol(String protocol)
           
 voidsetReceiverAID(AgentID aid)
           
 voidsetReceiverAIDs(List aids)
           
 voidsetReplyByUTC(UTCContainer utc)
           
 voidsetReplyToAIDs(List aids)
           
 voidsetReplyWith(String reply_with)
           
 voidsetSenderAID(AgentID aid)
           
 booleansetUserSlot(String slot_name, String value)
          Sets the value associated with a user-defined slot

Field Detail

BYTELENGTH_ENCODING

public final static int BYTELENGTH_ENCODING

FIPA_OS_SERIALIZATION

public final static String FIPA_OS_SERIALIZATION
ACL Encoding using Java Serialisation

FIPA00069

public final static String FIPA00069
ACL Encoding name as defined in FIPA00069

FIPA00070

public final static String FIPA00070
ACL Encoding name as defined in FIPA00070

FIPA00071

public final static String FIPA00071
ACL Encoding name as defined in FIPA00071

RESERVED_SLOT_NAMES

public final static List RESERVED_SLOT_NAMES
Reserved slot names in a List for convenience

STRINGLITERAL_ENCODING

public final static int STRINGLITERAL_ENCODING
Content encoding constants - see FIPA ACL spec.
Constructor Detail

ACL

public ACL()
Creates an empty ACL communication
Method Detail

addReceiverAID

public void addReceiverAID(AgentID aid)

addReplyToAID

public void addReplyToAID(AgentID aid)

clone

public Object clone()

getContentEncoding

public String getContentEncoding()

getContentObject

public Object getContentObject()

getContentObject

public Object getContentObject(boolean do_decode)
Alternative getContentObject() - used by the ACL parser to get the content un-changed
Parameters:
do_decode - Indicates if the content object should be manipulated before being returned

getConversationID

public String getConversationID()

getEncoding

public int getEncoding()
Indicates current/prefered content encoding type

For use by ACL Parser


getInReplyTo

public String getInReplyTo()

getLanguage

public String getLanguage()

getOntology

public String getOntology()

getPerformative

public String getPerformative()

getProtocol

public String getProtocol()

getReceiverAID

public AgentID getReceiverAID()
Get just the first AID of the receivers field, if present

getReceiverAIDs

public List getReceiverAIDs()

getReplyByUTC

public UTCContainer getReplyByUTC()

getReplyToAIDs

public List getReplyToAIDs()

getReplyWith

public String getReplyWith()

getSenderAID

public AgentID getSenderAID()

getUserSlot

public String getUserSlot(String slot_name)
Get the value associated with a user-defined slot

getUserSlots

public Set getUserSlots()
Gets a list of the user-defined slot names for this ACL

isBracketsStripped

public boolean isBracketsStripped()
Indicates if brackets have been stripped from SL content expression

For use by ACL Parser


isEncoded

public boolean isEncoded()
Indicates if content has been encoded (as either BYTELENGTH or STRINGLITERAL)

For use by ACL Parser


main

public static void main(String[] args)
throws java.lang.Throwable

setContentEncoding

public void setContentEncoding(String encoding)

setContentObject

public void setContentObject(Object content)

setContentObject

public void setContentObject(Object content, int encode)
Sets the content, optionally encoding the content
as the specified type (see FIPA specification), if it is Stringified
Parameters:
content - The content of the message
encode - Indicates the type of encoding to use for the string

setContentObjectACLParser

public void setContentObjectACLParser(String s)
Method to be invoked by the ACLParser to set the content -
causes outer brakets to be stripped from SL

setConversationID

public void setConversationID(String conv_id)

setInReplyTo

public void setInReplyTo(String in_reply_to)

setLanguage

public void setLanguage(String lang)

setOntology

public void setOntology(String ont)

setPerformative

public void setPerformative(String perf)

setProtocol

public void setProtocol(String protocol)

setReceiverAID

public void setReceiverAID(AgentID aid)

setReceiverAIDs

public void setReceiverAIDs(List aids)

setReplyByUTC

public void setReplyByUTC(UTCContainer utc)

setReplyToAIDs

public void setReplyToAIDs(List aids)

setReplyWith

public void setReplyWith(String reply_with)

setSenderAID

public void setSenderAID(AgentID aid)

setUserSlot

public boolean setUserSlot(String slot_name, String value)
Sets the value associated with a user-defined slot
Returns: True if the slot was set OK, false if the slot name specified is
a reserved value

Association Links

to Class java.lang.String

Reserved slot names (i.e. user-slots cannot have the same name as defined in
this array)

to Class java.util.List

Reserved slot names in a List for convenience

to Class java.lang.String

ACL Encoding name as defined in FIPA00070

to Class java.lang.String

ACL Encoding name as defined in FIPA00069

to Class java.lang.String

ACL Encoding name as defined in FIPA00071

to Class java.lang.String

ACL Encoding using Java Serialisation

to Class java.lang.String

Encoding type for content of this ACL message

to Class fipaos.ont.fipa.fipaman.AgentID

AID of the Agent sending the ACL communication

to Class java.util.List

AID('s) of the recipients of the message

to Class java.util.List

Reply-to field of the ACL communication

to Class java.lang.Object

Content of this communication - can be any type of object.

to Class java.lang.String

Language of the content (only used if this is deparsed into a String form, or
is already in a String form)

to Class java.lang.String

Ontology of the content of this ACL communication

to Class java.lang.String

Protocol used within the current conversation

to Class java.lang.String

Conversation-id of the conversation that this communication belongs to

to Class java.lang.String

In-reply-to field of the ACL communication

to Class java.lang.String

Reply-with field of the ACL communication

to Class fipaos.util.UTCContainer

Reply-to field of the ACL communication

to Class java.lang.String

Performative associated with this communication

to Class java.util.Map

Map to contain users slots that have been defined for this ACL instance