|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object biz.chitec.quarterback.gjsa.ServerReply
encapsulates a single reply from a GJSA server. ServerReply is returned from a GJSA server to a querying client. Each ServerReply has the reply for exactly one ServerRequest. A ServerReply consists of a type field and one result. This may be of any type or even left out.
ServerReply is also the main instance for converting reply types between their representations. Within the ServerReply class is the central storage for the list of known reply symbols, and ServerReply has static methods to query these.
Field Summary | |
(package private) static java.util.List |
cshv
Chat symbol holder vector |
private static Logger |
mess
ServerReply may print messages to global logger when inserting chat symbol holder |
(package private) static java.util.ResourceBundle |
rb
Holder for messages' resource bundle |
java.lang.Object |
result
The result |
boolean |
showparam
Marker whether the result shell be logged or not. |
int |
type
The reply type. |
Constructor Summary | |
ServerReply(int t)
Constructs a reply without result (just reply type). |
|
ServerReply(int t,
java.lang.Object o)
Constructs a reply with type and result (which is of any type). |
|
ServerReply(int t,
java.lang.Object o,
boolean sp)
Constructs a reply with type, result and logging marker. |
Method Summary | |
static void |
addChatSymbolHolder(ChatSymbolHolder cshx)
Adds a chat symbol holder |
boolean |
equals(java.lang.Object o)
Checks equality of this ServerReply to something else. |
java.lang.Object |
getMessageResult()
Return result. |
static int |
getReplyNum(java.lang.String n)
Class method. |
int |
getReplyType()
Return the reply type |
java.lang.Object |
getResult()
Return the result. |
boolean |
isPositive()
Convenience method for reply checking: Returns whether this reply was somehow positive, i.e. |
java.lang.String |
replyTypeName()
Returns the reply type in symbolic representation. |
static void |
setLogger(Logger m)
Set the logger ServerReply may write messages to when inserting chat symbol holder |
static void |
setResourceBundle(java.util.ResourceBundle rbx)
Sets the ServerReply global resource bundle with multilingual messages |
java.lang.String |
toString()
Convert the ServerReply to a string. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static Logger mess
static java.util.List cshv
static java.util.ResourceBundle rb
public int type
public java.lang.Object result
public boolean showparam
Constructor Detail |
public ServerReply(int t)
public ServerReply(int t, java.lang.Object o)
public ServerReply(int t, java.lang.Object o, boolean sp)
Method Detail |
public static void setLogger(Logger m)
public static void addChatSymbolHolder(ChatSymbolHolder cshx)
public static void setResourceBundle(java.util.ResourceBundle rbx)
public int getReplyType()
public java.lang.Object getResult()
public java.lang.Object getMessageResult()
public java.lang.String replyTypeName()
public static int getReplyNum(java.lang.String n)
public boolean equals(java.lang.Object o)
public java.lang.String toString()
public boolean isPositive()
|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |