fipaos.parser.acl.bitefficient
Class ACLEncoder

java.lang.Object
  |
  +--fipaos.parser.acl.bitefficient.ACLEncoder
All Implemented Interfaces:
ACLConstants

public class ACLEncoder
extends java.lang.Object
implements ACLConstants

ACLEncoder implements an encoder for bit-efficient ACLMessages.

Author:
Heikki Helin, Mikko Laukkanen

Fields inherited from interface fipaos.parser.acl.bitefficient.ACLConstants
ACL_ABS_DATE_FOLLOWS, ACL_ABS_DATET_FOLLOWS, ACL_ACCEPTPROPOSAL, ACL_AGREE, ACL_AID_ADDRESSES, ACL_AID_FOLLOWS, ACL_AID_RESOLVERS, ACL_AID_USERDEFINED, ACL_BITEFFICIENT, ACL_BITEFFICIENT_CODETABLE, ACL_BITEFFICIENT_NO_CODETABLE, ACL_CANCEL, ACL_CFP, ACL_CONFIRM, ACL_CT_BLE_STR_FOLLOWS, ACL_CT_STRING_FOLLOWS, ACL_CT_WORD_FOLLOWS, ACL_DATE_FOLLOWS, ACL_DATE_LEN, ACL_DECNUM_FOLLOWS, ACL_DISCONFIRM, ACL_END_OF_COLLECTION, ACL_END_OF_MSG, ACL_END_OF_PARAM, ACL_EXPR_LEVEL_DOWN, ACL_EXPR_LEVEL_UP, ACL_FAILURE, ACL_HEXNUM_FOLLOWS, ACL_INFORM, ACL_INFORMIF, ACL_INFORMREF, ACL_MSG_CONTENT_TYPE_OBJECT, ACL_MSG_CONTENT_TYPE_STRING, ACL_MSG_PARAM_CONTENT, ACL_MSG_PARAM_CONVERSATION_ID, ACL_MSG_PARAM_ENCODING, ACL_MSG_PARAM_IN_REPLY_TO, ACL_MSG_PARAM_LANGUAGE, ACL_MSG_PARAM_ONTOLOGY, ACL_MSG_PARAM_PROTOCOL, ACL_MSG_PARAM_RECEIVER, ACL_MSG_PARAM_REPLY_BY, ACL_MSG_PARAM_REPLY_TO, ACL_MSG_PARAM_REPLY_WITH, ACL_MSG_PARAM_SENDER, ACL_NEW_BLE_STR16_FOLLOWS, ACL_NEW_BLE_STR32_FOLLOWS, ACL_NEW_BLE_STR8_FOLLOWS, ACL_NEW_MSGPARAM_FOLLOWS, ACL_NEW_MSGTYPE_FOLLOWS, ACL_NEW_STRING_FOLLOWS, ACL_NEW_WORD_FOLLOWS, ACL_NOTUNDERSTOOD, ACL_PROPAGATE, ACL_PROPOSE, ACL_PROXY, ACL_QUERYIF, ACL_QUERYREF, ACL_REFUSE, ACL_REJECTPROPOSAL, ACL_REQUEST, ACL_REQUESTWHEN, ACL_REQUESTWHENEVER, ACL_SUBSCRIBE, ACL_VERSION
 
Constructor Summary
ACLEncoder()
          Constructor for the encoder.
ACLEncoder(int sz)
          Constructor for the encoder.
ACLEncoder(int sz, EncoderCodetable ct)
          Constructor for the encoder.
 
Method Summary
 ByteArray encode(ACL m)
          Encodes an ACL message.
 ByteArray encode(ACL m, byte c)
          Encodes an ACL message.
 EncoderCodetable getCodeTable()
          Returns the codetable associated with this encoder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ACLEncoder

public ACLEncoder()
Constructor for the encoder. Initialises the ACL encoder with no codetable coding scheme.

ACLEncoder

public ACLEncoder(int sz)
Constructor for the encoder. Initializes the ACL encoder with a codetable.

ACLEncoder

public ACLEncoder(int sz,
                  EncoderCodetable ct)
Constructor for the encoder. Initializes the ACL encoder with a codetable
Method Detail

getCodeTable

public EncoderCodetable getCodeTable()
Returns the codetable associated with this encoder

encode

public ByteArray encode(ACL m)
Encodes an ACL message.
Parameters:
m - Message to encode

encode

public ByteArray encode(ACL m,
                        byte c)
Encodes an ACL message.
Parameters:
m - Message to encode
c - Coding scheme (ACL_BITEFFICIENT_CODETABLE or ACL_BITEFFICIENT_NO_CODETABLE)