Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## madkit.messages
Class ACLMessage

    java.lang.Object
      madkit.kernel.Message
          madkit.messages.ActMessage
              madkit.messages.ACLMessage

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable

    public class ACLMessage

extends ActMessage

This class describes an ACL message. It provides accessors for all message parameters defined in the FIPA 97 spectification part 2. Note that the :receiver and :sender are automatically mapped to the MadKit AgentAddress.

Version:
  1.1
Author:
  Ol. Gutknecht, J. Ferber
See Also:
  Serialized Form

Field Summary
`static int` | `ACCEPT_PROPOSAL` constant identifying the FIPA performative
`static java.lang.String` | `ACCEPT_PROPOSAL_STRING`
`static int` | `AGREE` constant identifying the FIPA performative
`static java.lang.String` | `AGREE_STRING`
`static int` | `CANCEL` constant identifying the FIPA performative
`static java.lang.String` | `CANCEL_STRING`
`static int` | `CFP` constant identifying the FIPA performative
`static java.lang.String` | `CFP_STRING`
`static int` | `CONFIRM` constant identifying the FIPA performative
`static java.lang.String` | `CONFIRM_STRING`
`static int` | `DISCONFIRM` constant identifying the FIPA performative
`static java.lang.String` | `DISCONFIRM_STRING`
`static int` | `FAILURE` constant identifying the FIPA performative
`static java.lang.String` | `FAILURE_STRING`
`static int` | `INFORM` constant identifying the FIPA performative
`static int` | `INFORM_IF` constant identifying the FIPA performative
`static java.lang.String` | `INFORM_IF_STRING`
`static int` | `INFORM_REF` constant identifying the FIPA performative
`static java.lang.String` | `INFORM_REF_STRING`
`static java.lang.String` | `INFORM_STRING`
`static int` | `NOT_UNDERSTOOD` constant identifying the FIPA performative
`static java.lang.String` | `NOT_UNDERSTOOD_STRING`
`static java.util.List<java.lang.String>` | `performatives`
`static int` | `PROPAGATE` constant identifying the FIPA performative
`static java.lang.String` | `PROPAGATE_STRING`
`static int` | `PROPOSE` constant identifying the FIPA performative
`static java.lang.String` | `PROPOSE_STRING`
`static int` | `PROXY` constant identifying the FIPA performative
`static java.lang.String` | `PROXY_STRING`
`static int` | `QUERY_IF` constant identifying the FIPA performative
`static java.lang.String` | `QUERY_IF_STRING`
`static int` | `QUERY_REF` constant identifying the FIPA performative
`static java.lang.String` | `QUERY_REF_STRING`
`static int` | `REFUSE` constant identifying the FIPA performative
`static java.lang.String` | `REFUSE_STRING`
`static int` | `REJECT_PROPOSAL` constant identifying the FIPA performative
`static java.lang.String` | `REJECT_PROPOSAL_STRING`
`static int` | `REQUEST` constant identifying the FIPA performative
`static java.lang.String` | `REQUEST_STRING`
`static int` | `REQUEST_WHEN` constant identifying the FIPA performative
`static java.lang.String` | `REQUEST_WHEN_STRING`
`static int` | `REQUEST_WHENEVER` constant identifying the FIPA performative
`static java.lang.String` | `REQUEST_WHENEVER_STRING`
`static int` | `SUBSCRIBE` constant identifying the FIPA performative
`static java.lang.String` | `SUBSCRIBE_STRING`
`static int` | `UNKNOWN` constant identifying an unknown performative

Fields inherited from class madkit.messages.ActMessage
`action, fields`

Constructor Summary
`ACLMessage()` Default constructor for ACLMessage class
`ACLMessage(int perf, java.lang.String cont)`
`ACLMessage(java.lang.String actType)` Constructor for ACLMessage class
`ACLMessage(java.lang.String actType, java.lang.String cont)` Constructor for ACLMessage class

Method Summary
`void` | `addReceiver(AgentAddress r)` Adds a value to `:receiver` slot.
`void` | `addReplyTo(AgentAddress dest)` Adds a value to `:reply-to` slot.
`void` | `clearAllReceiver()` Removes all values from `:receiver` slot.
`void` | `clearAllReplyTo()` Removes all values from `:reply_to` slot.
`ACLMessage` | `createReply()` create a new ACLMessage that is a reply to this message.
`java.lang.String` | `getAct()`
`java.lang.String` | `getConversationID()`
`java.lang.String` | `getEncoding()`
`java.lang.String` | `getEnvelope()`
`java.lang.String` | `getInReplyTo()`
`java.lang.String` | `getLanguage()`
`java.lang.String` | `getOntology()`
`java.lang.String` | `getPerformative()`
`java.lang.String` | `getProtocol()`
`java.util.List<AgentAddress>` | `getReceivers()` Return the list of receivers..
`java.lang.String` | `getReplyBy()`
`java.lang.String` | `getReplyWith()`
`static void` | `main(java.lang.String[] args)`
`boolean` | `removeReceiver(AgentAddress r)` Removes a value from `:receiver` slot.
`boolean` | `removeReplyTo(AgentAddress dest)` Removes a value from `:reply_to` slot.
`void` | `setConversationID(java.lang.String s)`
`void` | `setEncoding(java.lang.String s)`
`void` | `setEnvelope(java.lang.String s)`
`void` | `setInReplyTo(java.lang.String s)`
`void` | `setLanguage(java.lang.String s)`
`void` | `setOntology(java.lang.String s)`
`void` | `setPerformative(java.lang.String s)`
`void` | `setProtocol(java.lang.String s)`
`void` | `setReplyBy(java.util.Date s)`
`void` | `setReplyBy(java.lang.String s)`
`void` | `setReplyWith(java.lang.String s)`
`java.lang.String` | `toString()` Returns a debug string with envelope and content for the message

Methods inherited from class madkit.messages.ActMessage
`getAction, getContent, getFieldValue, getKeys, getObject, setContent, setField, setObject`

Methods inherited from class madkit.kernel.Message
`clone, getCreationDate, getReceiver, getSender`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### ACCEPT_PROPOSAL

    public static final int ACCEPT_PROPOSAL

  constant identifying the FIPA performative

  See Also:
    Constant Field Values

### AGREE

    public static final int AGREE

  constant identifying the FIPA performative

  See Also:
    Constant Field Values

### CANCEL

    public static final int CANCEL

  constant identifying the FIPA performative

  See Also:
    Constant Field Values

### CFP

    public static final int CFP

  constant identifying the FIPA performative

  See Also:
    Constant Field Values

### CONFIRM

    public static final int CONFIRM

  constant identifying the FIPA performative

  See Also:
    Constant Field Values

### DISCONFIRM

    public static final int DISCONFIRM

  constant identifying the FIPA performative

  See Also:
    Constant Field Values

### FAILURE

    public static final int FAILURE

  constant identifying the FIPA performative

  See Also:
    Constant Field Values

### INFORM

    public static final int INFORM

  constant identifying the FIPA performative

  See Also:
    Constant Field Values

### INFORM_IF

    public static final int INFORM_IF

  constant identifying the FIPA performative

  See Also:
    Constant Field Values

### INFORM_REF

    public static final int INFORM_REF

  constant identifying the FIPA performative

  See Also:
    Constant Field Values

### NOT_UNDERSTOOD

    public static final int NOT_UNDERSTOOD

  constant identifying the FIPA performative

  See Also:
    Constant Field Values

### PROPOSE

    public static final int PROPOSE

  constant identifying the FIPA performative

  See Also:
    Constant Field Values

### QUERY_IF

    public static final int QUERY_IF

  constant identifying the FIPA performative

  See Also:
    Constant Field Values

### QUERY_REF

    public static final int QUERY_REF

  constant identifying the FIPA performative

  See Also:
    Constant Field Values

### REFUSE

    public static final int REFUSE

  constant identifying the FIPA performative

  See Also:
    Constant Field Values

### REJECT_PROPOSAL

    public static final int REJECT_PROPOSAL

  constant identifying the FIPA performative

  See Also:
    Constant Field Values

### REQUEST

    public static final int REQUEST

  constant identifying the FIPA performative

  See Also:
    Constant Field Values

### REQUEST_WHEN

    public static final int REQUEST_WHEN

  constant identifying the FIPA performative

  See Also:
    Constant Field Values

### REQUEST_WHENEVER

    public static final int REQUEST_WHENEVER

  constant identifying the FIPA performative

  See Also:
    Constant Field Values

### SUBSCRIBE

    public static final int SUBSCRIBE

  constant identifying the FIPA performative

  See Also:
    Constant Field Values

### PROXY

    public static final int PROXY

  constant identifying the FIPA performative

  See Also:
    Constant Field Values

### PROPAGATE

    public static final int PROPAGATE

  constant identifying the FIPA performative

  See Also:
    Constant Field Values

### UNKNOWN

    public static final int UNKNOWN

  constant identifying an unknown performative

  See Also:
    Constant Field Values

### ACCEPT_PROPOSAL_STRING

    public static final java.lang.String ACCEPT_PROPOSAL_STRING

See Also:
  Constant Field Values

### AGREE_STRING

    public static final java.lang.String AGREE_STRING

See Also:
  Constant Field Values

### CANCEL_STRING

    public static final java.lang.String CANCEL_STRING

See Also:
  Constant Field Values

### CFP_STRING

    public static final java.lang.String CFP_STRING

See Also:
  Constant Field Values

### CONFIRM_STRING

    public static final java.lang.String CONFIRM_STRING

See Also:
  Constant Field Values

### DISCONFIRM_STRING

    public static final java.lang.String DISCONFIRM_STRING

See Also:
  Constant Field Values

### FAILURE_STRING

    public static final java.lang.String FAILURE_STRING

See Also:
  Constant Field Values

### INFORM_STRING

    public static final java.lang.String INFORM_STRING

See Also:
  Constant Field Values

### INFORM_IF_STRING

    public static final java.lang.String INFORM_IF_STRING

See Also:
  Constant Field Values

### INFORM_REF_STRING

    public static final java.lang.String INFORM_REF_STRING

See Also:
  Constant Field Values

### NOT_UNDERSTOOD_STRING

    public static final java.lang.String NOT_UNDERSTOOD_STRING

See Also:
  Constant Field Values

### PROPOSE_STRING

    public static final java.lang.String PROPOSE_STRING

See Also:
  Constant Field Values

### QUERY_IF_STRING

    public static final java.lang.String QUERY_IF_STRING

See Also:
  Constant Field Values

### QUERY_REF_STRING

    public static final java.lang.String QUERY_REF_STRING

See Also:
  Constant Field Values

### REFUSE_STRING

    public static final java.lang.String REFUSE_STRING

See Also:
  Constant Field Values

### REJECT_PROPOSAL_STRING

    public static final java.lang.String REJECT_PROPOSAL_STRING

See Also:
  Constant Field Values

### REQUEST_STRING

    public static final java.lang.String REQUEST_STRING

See Also:
  Constant Field Values

### REQUEST_WHEN_STRING

    public static final java.lang.String REQUEST_WHEN_STRING

See Also:
  Constant Field Values

### REQUEST_WHENEVER_STRING

    public static final java.lang.String REQUEST_WHENEVER_STRING

See Also:
  Constant Field Values

### SUBSCRIBE_STRING

    public static final java.lang.String SUBSCRIBE_STRING

See Also:
  Constant Field Values

### PROXY_STRING

    public static final java.lang.String PROXY_STRING

See Also:
  Constant Field Values

### PROPAGATE_STRING

    public static final java.lang.String PROPAGATE_STRING

See Also:
  Constant Field Values

### performatives

    public static java.util.List<java.lang.String> performatives

Constructor Detail

### ACLMessage

    public ACLMessage()

  Default constructor for ACLMessage class

### ACLMessage

    public ACLMessage(java.lang.String actType)

  Constructor for ACLMessage class

### ACLMessage

    public ACLMessage(java.lang.String actType,
                      java.lang.String cont)

  Constructor for ACLMessage class

### ACLMessage

    public ACLMessage(int perf,
                      java.lang.String cont)

Method Detail

### getAct

    public java.lang.String getAct()

### getPerformative

    public java.lang.String getPerformative()

### setPerformative

    public void setPerformative(java.lang.String s)

### addReceiver

    public void addReceiver(AgentAddress r)

  Adds a value to `:receiver` slot. Warning: no checks are made to validate the slot value.

  Parameters:
    `r` - The value to add to the slot value set.

### getReceivers

    public java.util.List<AgentAddress> getReceivers()

  Return the list of receivers..

### removeReceiver

    public boolean removeReceiver(AgentAddress r)

  Removes a value from `:receiver` slot. 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 `:receiver` slot. Warning: no checks are made to validate the slot value.

### addReplyTo

    public void addReplyTo(AgentAddress dest)

  Adds a value to `:reply-to` slot. Warning: no checks are made to validate the slot value.

  Parameters:
    `dest` - The value to add to the slot value set.

### removeReplyTo

    public boolean removeReplyTo(AgentAddress dest)

  Removes a value from `:reply_to` slot. 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_to` slot. Warning: no checks are made to validate the slot value.

### getEnvelope

    public java.lang.String getEnvelope()

### setEnvelope

    public void setEnvelope(java.lang.String s)

### getConversationID

    public java.lang.String getConversationID()

### setConversationID

    public void setConversationID(java.lang.String s)

### getProtocol

    public java.lang.String getProtocol()

### setProtocol

    public void setProtocol(java.lang.String s)

### getReplyWith

    public java.lang.String getReplyWith()

### setReplyWith

    public void setReplyWith(java.lang.String s)

### getReplyBy

    public java.lang.String getReplyBy()

### setReplyBy

    public void setReplyBy(java.lang.String s)

### setReplyBy

    public void setReplyBy(java.util.Date s)

### getInReplyTo

    public java.lang.String getInReplyTo()

  Overrides:
    `getInReplyTo` in class `ActMessage`

### setInReplyTo

    public void setInReplyTo(java.lang.String s)

  Overrides:
    `setInReplyTo` in class `ActMessage`

### getLanguage

    public java.lang.String getLanguage()

### setLanguage

    public void setLanguage(java.lang.String s)

### getEncoding

    public java.lang.String getEncoding()

### setEncoding

    public void setEncoding(java.lang.String s)

### getOntology

    public java.lang.String getOntology()

### setOntology

    public void setOntology(java.lang.String s)

### toString

    public java.lang.String toString()

  Description copied from class: `Message`
  Returns a debug string with envelope and content for the message

  Overrides:
    `toString` in class `Message`

### createReply

    public ACLMessage 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

### main

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Madkit Team (O. Gutknecht, J. Ferber, F. Michel et al.) All Rights Reserved.