|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.jetrix.protocols.AbstractProtocol
net.jetrix.protocols.QueryProtocol
public class QueryProtocol
Query Protocol. See http://jetrix.sourceforge.net/dev-guide.php#section2-4 for more information.
| Field Summary | |
|---|---|
static char |
EOL
Line terminator |
static String |
OK
Response terminator |
| Constructor Summary | |
|---|---|
QueryProtocol()
|
|
| Method Summary | |
|---|---|
String |
applyStyle(String text)
Transform the style tags (<blue>, <u>, etc...) contained in the specified string into the style codes of this protocol. |
char |
getEOL()
Return the end of line character used by this protocol. |
Message |
getMessage(String message)
Parse the specified string and return the corresponding server message for this protocol. |
String |
getName()
Return the name of this protocol. |
static boolean |
isQueryCommand(String command)
Test if the specified string is a valid query request. |
String |
translate(Message m,
Locale locale)
Translate the specified message into a string that will be sent to a client using this protocol. |
String |
translate(NoConnectingMessage m,
Locale locale)
|
String |
translate(PlineMessage m,
Locale locale)
|
| Methods inherited from class net.jetrix.protocols.AbstractProtocol |
|---|
equals, hashCode, readFrame, readLine, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final char EOL
public static final String OK
| Constructor Detail |
|---|
public QueryProtocol()
| Method Detail |
|---|
public String getName()
Protocol
public Message getMessage(String message)
Protocol
message - the client message to parse
Message equivalent of the specified
String or null if the protocol cannot understand the message.
public String translate(Message m,
Locale locale)
Protocol
m - the message to translatelocale - the locale used for internationalized text messages
Message or null if it can't be translated.
public String translate(PlineMessage m,
Locale locale)
public String translate(NoConnectingMessage m,
Locale locale)
public String applyStyle(String text)
Protocol
text - the string to transform
public char getEOL()
Protocol
public static boolean isQueryCommand(String command)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||