|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
General tokens used both in the communication between chat
receiver and chat sender communication. A communication stream
consists of messages, with each message beginning with a
command word and ending in an end character
(CHAR_MSG_END
). Arguments may follow the
command word and are separated by Argument separators
(CHAR_ARG_SEP
).
The argument types for now are the booleans and string.
Booleans are encoded in fixed strings (STR_POSITIVE
,
STR_NEGATIVE
). Strings are enclosed in string
delimiters (CHAR_STRING_DELIMITER
). In order to
send string delimiter characters themselves in strings, a
quoting (CHAR_QUOTE
) mechanism is applied.
Command words in the server Reply are built by appending a
reply appendix (STR_REPLY
) to the initial
command word.
So, the general message format is
CommandWord[Reply]{':'(Boolean|('"'quotedText'"'))}'.'
The command words are defined in more specific protocols.
For convenience and to work around some compiler bugs (the language spec says that operands of `+' expressions involving a String are promoted to Strings, which should mean for characters: the respective character. At least the blackdown jdk 1.2 inserts the numeric value.), STR_ constants are defined for all CHAR_ constants, containing the same character, just in a String.
Field Summary | |
static char |
CHAR_ARG_SEP
The character that separates arguments from each other and from the command word. |
static char |
CHAR_MSG_END
The character that terminates each message. |
static char |
CHAR_MSG_EOL
An End-of-line character is appended to the messages. |
static char |
CHAR_QUOTE
The quoting character. |
static char |
CHAR_STRING_DELIMITER
The String bounding character. |
static java.lang.String |
STR_ARG_SEP
|
static java.lang.String |
STR_AUTHORIZE
Acknowledgement to send password |
static java.lang.String |
STR_MSG_END
|
static java.lang.String |
STR_MSG_EOL
|
static java.lang.String |
STR_NEG_ARG
Boolean reply, negative |
static java.lang.String |
STR_NEGATIVE
Negative acknowledgement |
static java.lang.String |
STR_POS_ARG
Boolean reply, positive |
static java.lang.String |
STR_POSITIVE
Positive acknowledgement |
static java.lang.String |
STR_QUOTE
|
static java.lang.String |
STR_REPLY
The string appended to the command word in the reply |
static java.lang.String |
STR_STRING_DELIMITER
|
static java.lang.String |
STR_WAIT
Acknowledgement to wait |
Field Detail |
public static final char CHAR_ARG_SEP
public static final java.lang.String STR_ARG_SEP
public static final char CHAR_MSG_END
public static final java.lang.String STR_MSG_END
public static final char CHAR_MSG_EOL
public static final java.lang.String STR_MSG_EOL
public static final char CHAR_STRING_DELIMITER
public static final java.lang.String STR_STRING_DELIMITER
public static final char CHAR_QUOTE
public static final java.lang.String STR_QUOTE
public static final java.lang.String STR_POSITIVE
public static final java.lang.String STR_NEGATIVE
public static final java.lang.String STR_WAIT
public static final java.lang.String STR_AUTHORIZE
public static final java.lang.String STR_REPLY
public static final java.lang.String STR_POS_ARG
public static final java.lang.String STR_NEG_ARG
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |