jade.lang.acl
Class LEAPACLCodec
java.lang.Object
jade.lang.acl.LEAPACLCodec
- All Implemented Interfaces:
- ACLCodec
public class LEAPACLCodec
- extends java.lang.Object
- implements ACLCodec
This class implements the LEAP codec for ACLMessages.
- Version:
- $Date: 2009-03-03 15:02:51 +0100 (mar, 03 mar 2009) $ $Revision: 6097 $
- Author:
- Jerome Picault - Motorola Labs, Giovanni Caire - TILAB
|
Field Summary |
static java.lang.String |
NAME
|
|
Method Summary |
ACLMessage |
decode(byte[] data,
java.lang.String charset)
Recovers an ACLMessage object back from raw data,
using the specific message representation to interpret the byte
sequence. |
static ACLMessage |
deserializeACL(java.io.DataInputStream dis)
|
static AID |
deserializeAID(java.io.DataInputStream dis)
|
byte[] |
encode(ACLMessage msg,
java.lang.String charset)
Encodes an ACLMessage object into a byte sequence,
according to the specific message representation. |
java.lang.String |
getName()
Query the name of the message representation handled by this
Codec object. |
static void |
serializeACL(ACLMessage msg,
java.io.DataOutputStream dos)
|
static void |
serializeAID(AID id,
java.io.DataOutputStream dos)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAME
public static java.lang.String NAME
LEAPACLCodec
public LEAPACLCodec()
encode
public byte[] encode(ACLMessage msg,
java.lang.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,
java.lang.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:
CodecException - If some kind of syntax error occurs.
ACLCodec.CodecException
getName
public java.lang.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.
serializeACL
public static final void serializeACL(ACLMessage msg,
java.io.DataOutputStream dos)
throws java.io.IOException
- Throws:
java.io.IOException
deserializeACL
public static final ACLMessage deserializeACL(java.io.DataInputStream dis)
throws java.io.IOException
- Throws:
java.io.IOException
serializeAID
public static final void serializeAID(AID id,
java.io.DataOutputStream dos)
throws java.io.IOException
- Throws:
java.io.IOException
deserializeAID
public static final AID deserializeAID(java.io.DataInputStream dis)
throws java.io.IOException
- Throws:
java.io.IOException
These are the official JADE API. For these API backward compatibility is guaranteed accross JADE versions