zeus.concepts
Class FIPAPerformative

java.lang.Object
  extended byzeus.concepts.Performative
      extended byzeus.concepts.FIPAPerformative

public class FIPAPerformative
extends Performative

FIPAPerformative extends the performative class so that when getReceivers() is called it converts the values in the vector into strings from FIPA_AID_Addresses. This is so that we can store the values and use them to contact FIPA agents, but for the Zeus internal agency we can use Zeus addressing.

Also there is a method String getFIPASender () which is used to return an FIPA_AID_Address.

Since:
1.1
Author:
Simon Thompson

Field Summary
protected  java.lang.String encrypted
          encrypted field is added to allow us to add sACL features later
(package private)  java.util.Vector received
          received is used to store any "received" elements: these are used to hold a list of agents that have previously had this message
(package private)  FIPA_AID_Address sender
           
 
Fields inherited from class zeus.concepts.Performative
ATTRIBUTE_TYPES, content, conversationId, envelope, inReplyTo, language, MESSAGE_TYPES, MESSAGE_TYPES_UPPER, ontology, protocol, receivers, replyBy, replyTo, replyWith, sb, type
 
Constructor Summary
FIPAPerformative(Performative perf)
           
FIPAPerformative(java.lang.String type)
           
 
Method Summary
 void appendContent(java.lang.String cont)
           
 FipaMessage FipaMessage()
           
 java.lang.String get_is_EncryptedXML()
          returns appropriate encryption descriptor wrapped in XML tags as per XC000084
 java.lang.String getEncryptionScheme()
          return a String which describes the encryption scheme that is being used
 FIPA_AID_Address getFIPAReceiver()
           
 java.util.Enumeration getFIPAReceivers()
          return the address of the receivers as FIPA_AID_Addresses
 java.util.Enumeration getReceivers()
          getReceivers overwrites the getReceivers in Performative to ensure that the correct result is produced when this performative is handled by Zeus internal communications.
 AgentID[] getReceiversAgentID()
          receivers are returned as FIPA.AgentID[] so that they can be packed into a message envelope by the FIPA_99_Transport
 java.lang.String getReceiversXML()
          spits out all receivers as XML strings
 FIPA_AID_Address getSender_As_FIPA_AID()
           
 java.lang.String getSender_As_FIPA_String()
          getFIPASender is a bit of a hack, it produces the FIPA_AID_Address in string format which is the sender field
 AgentID[] getSenderAgentID()
          sender is returned in a FIPA.AgentID[].
 java.lang.String getSenderXML()
          spits out the sender as XML
 Envelope jasEnvelope(FIPA_AID_Address addr, java.lang.String thisTarget)
          Build a javax.agent.Envelope from a fipa address and a string
 Performative performative()
          produce a performative that can be handled by native zeus parsers
 java.lang.String receivedToXML()
          get the receiveds as XML: possible compliance issues, what to do with more than one received?
 void setEncryptionDescriptor(java.lang.String descriptor)
          set a string that will be used to flag the encryption mechanism we are using to other agents
 void setReceived(FIPA_Received received)
          use this method to add any "received's" (stamps that agents that have had the message have put on it) that this message should have
 void setSender(FIPA_AID_Address sender)
          overloaded
 java.lang.String toFIPAString()
          content brackets may be SL specific
 
Methods inherited from class zeus.concepts.Performative
getAddress, getAttribute, getContent, getConversationId, getEnvelope, getEnvelopeItem, getInReplyTo, getLanguage, getOntology, getProtocol, getReceiver, getReceiveTime, getReplyBy, getReplyTo, getReplyWith, getSender, getSendTime, getType, isValid, send, setAddress, setAttribute, setContent, setConversationId, setEnvelope, setEnvelopeItem, setInReplyTo, setLanguage, setOntology, setProtocol, setReceiver, setReceivers, setReceivers, setReceivers, setReceiveTime, setReplyBy, setReplyTo, setReplyWith, setSender, setSendTime, setType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sender

FIPA_AID_Address sender

received

java.util.Vector received
received is used to store any "received" elements: these are used to hold a list of agents that have previously had this message


encrypted

protected java.lang.String encrypted
encrypted field is added to allow us to add sACL features later

Constructor Detail

FIPAPerformative

public FIPAPerformative(java.lang.String type)

FIPAPerformative

public FIPAPerformative(Performative perf)
Method Detail

getFIPAReceivers

public java.util.Enumeration getFIPAReceivers()
return the address of the receivers as FIPA_AID_Addresses


getReceivers

public java.util.Enumeration getReceivers()
getReceivers overwrites the getReceivers in Performative to ensure that the correct result is produced when this performative is handled by Zeus internal communications. The receivers are set to string equivalents....

Overrides:
getReceivers in class Performative

performative

public Performative performative()
produce a performative that can be handled by native zeus parsers


getSender_As_FIPA_String

public java.lang.String getSender_As_FIPA_String()
getFIPASender is a bit of a hack, it produces the FIPA_AID_Address in string format which is the sender field


getSender_As_FIPA_AID

public FIPA_AID_Address getSender_As_FIPA_AID()

setReceived

public void setReceived(FIPA_Received received)
use this method to add any "received's" (stamps that agents that have had the message have put on it) that this message should have


receivedToXML

public java.lang.String receivedToXML()
get the receiveds as XML: possible compliance issues, what to do with more than one received? My answer here is to build something that replicates the example given by FIPA for one, and to get it to produce a plausable output in the case where there are many


appendContent

public void appendContent(java.lang.String cont)

setSender

public void setSender(FIPA_AID_Address sender)
overloaded


toFIPAString

public java.lang.String toFIPAString()
content brackets may be SL specific


getReceiversAgentID

public AgentID[] getReceiversAgentID()
receivers are returned as FIPA.AgentID[] so that they can be packed into a message envelope by the FIPA_99_Transport


getSenderAgentID

public AgentID[] getSenderAgentID()
sender is returned in a FIPA.AgentID[]. In Zeus there is but one sender, whereas the FIPA Spec and the JAS spec seem to think that there can be multiple senders.. I don't know how this can be true, and frankly, it frightens me a bit


getEncryptionScheme

public java.lang.String getEncryptionScheme()
return a String which describes the encryption scheme that is being used


setEncryptionDescriptor

public void setEncryptionDescriptor(java.lang.String descriptor)
set a string that will be used to flag the encryption mechanism we are using to other agents


getFIPAReceiver

public FIPA_AID_Address getFIPAReceiver()

jasEnvelope

public Envelope jasEnvelope(FIPA_AID_Address addr,
                            java.lang.String thisTarget)
Build a javax.agent.Envelope from a fipa address and a string


getSenderXML

public java.lang.String getSenderXML()
spits out the sender as XML


getReceiversXML

public java.lang.String getReceiversXML()
spits out all receivers as XML strings


get_is_EncryptedXML

public java.lang.String get_is_EncryptedXML()
returns appropriate encryption descriptor wrapped in XML tags as per XC000084


FipaMessage

public FipaMessage FipaMessage()


Copyright © 2000-2003 BT Exact Technologies. All Rights Reserved.