|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ACLCodec
An object implementing ACLCodec has the ability to convert
ACLMessages into Strings and Strings into
ACLMessages. The way this conversion occurs is not defined
by this interface and can be arbitrary as long as the following statement
is true:
ACLMessage m;
ACLCodec c;
m.eqals(c.decode(c.encode(m)));
This means that a String containing an encoded message can always be
decoded by the ACLCodec it was encoded by and the resulting
message will be equal to the original one.
It is a desirable property to have the previous statement hold
even for different instances of the same class implementing
ACLCodec.
However, this cannot be enforced by this interface since the output
of certain ACLCodec objects can depend on the internal
configuration of the instances.
| Method Summary | |
|---|---|
ACLMessage |
decode(java.lang.String str)
Decodes . |
java.lang.String |
encode(ACLMessage message)
Encodes an ACLMessage and returns the resulting
String. |
java.lang.String |
getMimeType()
|
| Method Detail |
|---|
ACLMessage decode(java.lang.String str)
throws DecodingException
str - A String representation of an ACLMessage
ACLMessage represented by str
DecodingException - For some reason the String
could not be decoded.
java.lang.String encode(ACLMessage message)
throws EncodingException
ACLMessage and returns the resulting
String.
message - The ACLMessage to be encoded.
message
EncodingException - For some reason the message
could not be encoded.java.lang.String getMimeType()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||