All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class amarquee.QMessage

java.lang.Object
   |
   +----amarquee.QMessage

public class QMessage
extends Object
All events from AMarquee come in this package! You can get a QMessage from an AMarqueeEvent's getQMessage() method.


Constructor Index

 o QMessage(int, int, int)

Method Index

 o getActualLen()
 o getData()
 o getDataLen()
 o getErrorLine()
 o getID()
 o getPath()
 o getQRunInfo()
 o getSize()
 o getStatus()

Constructors

 o QMessage
 public QMessage(int err,
                 int sLine,
                 int msgID)

Methods

 o getActualLen
 public int getActualLen()
Returns:
int - Length of the data buffer associated with this node, as it is stored on the server. This value is usually equal to getDataLen(), but it may be larger than getDataLen() if you told GetOp or SubscribeOp to limit the size of data buffers you receive (via the maxBytes argument).
 o getData
 public byte[] getData()
Returns:
byte[] - If a data buffer is being returned with the QMessage, this will return a reference to the byte array (otherwise it will be null).
 o getDataLen
 public int getDataLen()
Returns:
int - Length of getData() buffer in bytes, or 0 if not applicable.
 o getErrorLine
 public int getErrorLine()
Returns:
int - Line # of the server source code that generated the error. Useful for debugging.
 o getID
 public int getID()
Returns:
int - Returns the ID number of a transaction you sent, that this message is in response to. ID numbers for each transaction are returned by the *Op() calls, and let you determine which QMessages resulted from which calls. Valid ID numbers are monotonically increasing, starting at 1. You may see qm_ID's of 0, if the message is not associated with any particular transaction (such as when the message was caused by a MessageOp executed by another client), or of -1 for certain types of error.
 o getPath
 public String getPath()
Returns:
String - Pathname of a node, or null if not applicable. If the QMessage is returning information about a particular node, this will return a reference to a String-object, with a fully qualified path string identifying the node. As returned by the AMarqueed server, this string will never have wildcards in it, and will always be "absolute" (with the computer and program name explicitely specified). If no node is being referenced (as in, for example, error or ping messages), this entry will be NULL.
 o getQRunInfo
 public QRunInfo getQRunInfo()
Returns:
QRunInfo - the QRunInfo associated with an Info event - aMarqueeInfo(AMarqueeEvent e).
 o getSize
 public int getSize()
Returns:
int - Length of getData() buffer in bytes, or 0 if not applicable.
 o getStatus
 public int getStatus()
Returns:
int - One of the QERROR_* codes defined in the AMarquee class. Returns the error status of the message. For normal operation results, this will be set to 0. You should only read this in the aMarqueeError(AmarqueeEvent) method of your message handling class. If there was an error, it may be one of the following:

AMarquee.QERROR_UNKNOWN

Something has gone wrong, but nobody knows what! You should actually never see this.

AMarquee.QERROR_MALFORMED_KEY

You specified a node path that was syntactically incorrect, or is impossible (such as specifying a node in a directory that doesn't exist)

AMarquee.QERROR_NO_SERVER_MEM

The AMarquee server ran out of memory and thus was not able to perform the operation. This is a serious error, and if you get it you should not count on any subsequent transactions in the same message packet having been performed!

AMarquee.QERROR_UNIMPLEMENTED

You tried to use a feature that I haven't implemented yet. You may get this error if you are receiving data in a direct client-to-client connection and the sending client sends you a transaction that does not make sense in this context. (for example, a SetAccessOp)

Amarquee.QERROR_NO_CLIENT_MEM

Your computer ran out of memory, and thus could not perform the operation.


All Packages  Class Hierarchy  This Package  Previous  Next  Index