Package jade.lang.acl

Class LEAPACLCodec

  • All Implemented Interfaces:
    ACLCodec

    public class LEAPACLCodec
    extends Object
    implements ACLCodec
    This class implements the LEAP codec for ACLMessages.
    Version:
    $Date$ $Revision$
    Author:
    Jerome Picault - Motorola Labs, Giovanni Caire - TILAB
    • Constructor Detail

      • LEAPACLCodec

        public LEAPACLCodec()
    • Method Detail

      • encode

        public byte[] encode​(ACLMessage msg,
                             String charset)
        Encodes an ACLMessage object into a byte sequence, according to the specific message representation.
        Specified by:
        encode in interface ACLCodec
        Parameters:
        msg - The ACL message to encode.
        charset - This parameter is not taken into account
        Returns:
        a byte array, containing the encoded message.
      • decode

        public ACLMessage decode​(byte[] data,
                                 String charset)
                          throws ACLCodec.CodecException
        Recovers an ACLMessage object back from raw data, using the specific message representation to interpret the byte sequence.
        Specified by:
        decode in interface ACLCodec
        Parameters:
        data - The byte sequence containing the encoded message.
        charset - This parameter is not taken into account
        Returns:
        A new ACLMessage object, built from the raw data.
        Throws:
        ACLCodec.CodecException - If some kind of syntax error occurs.
      • getName

        public String getName()
        Query the name of the message representation handled by this Codec object. The FIPA standard representations have a name starting with "fipa.acl.rep.".
        Specified by:
        getName in interface ACLCodec
        Returns:
        The name of the handled ACL message representation.