All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class tc.message.ResultMessage

java.lang.Object
   |
   +----connection.Message
           |
           +----tc.message.ResultMessage

public class ResultMessage
extends Message
ResultMessage is a specialized message for sending response, e.g. from the server to a client. The respons consists of a byte (usually either constant OKAY or FAILED) and an arbitrary message string.

Version:
0.30, 1998/04/01
Author:
FRED development team, Antti Viljamaa, Jukka Viljamaa
See Also:
Message

Variable Index

 o FAILED
The status byte constant for negative response.
 o msg
The message string.
 o OKAY
The status byte constant for positive response.
 o status
The status byte.

Constructor Index

 o ResultMessage(byte)
Initializes a new ResultMessage object with the given status byte.
 o ResultMessage(byte, byte)
Initializes a new ResultMessage object with the given message id and status byte.
 o ResultMessage(byte, byte, String)
Initializes a new ResultMessage object with the given message id, status byte, and message string.
 o ResultMessage(byte, String)
Initializes a new ResultMessage object with the given status byte and message string.

Method Index

 o getMsg()
Gets the message string.
 o getStatus()
Gets the status byte.
 o setMsg(String)
Sets the message string.
 o setStatus(byte)
Sets the status byte.

Variables

 o OKAY
 public static final byte OKAY
The status byte constant for positive response.

 o FAILED
 public static final byte FAILED
The status byte constant for negative response.

 o msg
 private String msg
The message string.

 o status
 private byte status
The status byte.

Constructors

 o ResultMessage
 public ResultMessage(byte status)
Initializes a new ResultMessage object with the given status byte.

Parameters:
status - The status byte.
 o ResultMessage
 public ResultMessage(byte id,
                      byte status)
Initializes a new ResultMessage object with the given message id and status byte.

Parameters:
id - The optional message id. The user can use this field to separate different messages that use this same class.
status - The status byte.
 o ResultMessage
 public ResultMessage(byte status,
                      String msg)
Initializes a new ResultMessage object with the given status byte and message string.

Parameters:
status - The status byte.
msg - The message string.
 o ResultMessage
 public ResultMessage(byte id,
                      byte status,
                      String msg)
Initializes a new ResultMessage object with the given message id, status byte, and message string.

Parameters:
id - The optional message id. The user can use this field to separate different messages that use this same class.
status - The status byte.
msg - The message string.

Methods

 o getMsg
 public String getMsg()
Gets the message string.

 o getStatus
 public byte getStatus()
Gets the status byte.

 o setMsg
 public void setMsg(String s)
Sets the message string.

 o setStatus
 public void setStatus(byte s)
Sets the status byte.


All Packages  Class Hierarchy  This Package  Previous  Next  Index