com.ibm.as400.access
Class QueuedMessage

java.lang.Object
  |
  +--com.ibm.as400.access.AS400Message
        |
        +--com.ibm.as400.access.QueuedMessage
All Implemented Interfaces:
java.io.Serializable

public class QueuedMessage
extends AS400Message
implements java.io.Serializable

The QueuedMessage class represents a message on an AS/400 message queue or job log.

Some of the attributes have associated get methods defined in this class. These are provided for backwards compatibility with previous versions of the AS/400 Toolbox for Java. The complete set of attribute values can be accessed using the RQueuedMessage class.

See Also:
RQueuedMessage, Serialized Form

Fields inherited from class com.ibm.as400.access.AS400Message
COMPLETION, DIAGNOSTIC, ESCAPE, ESCAPE_NOT_HANDLED, INFORMATIONAL, INQUIRY, NOTIFY, NOTIFY_NOT_HANDLED, REPLY_FROM_SYSTEM_REPLY_LIST, REPLY_MESSAGE_DEFAULT_USED, REPLY_NOT_VALIDITY_CHECKED, REPLY_SYSTEM_DEFAULT_USED, REPLY_VALIDITY_CHECKED, REQUEST, REQUEST_WITH_PROMPTING, SENDERS_COPY
 
Method Summary
 java.util.Calendar getDate()
          Returns the date and time the message was sent.
 java.lang.String getDefaultReply()
          Returns the default reply.
 java.lang.String getFileName()
          Returns the message file name.
 java.lang.String getFromJobName()
          Returns the sender job name.
 java.lang.String getFromJobNumber()
          Returns the sender job number.
 java.lang.String getFromProgram()
          Returns the sending program name.
 java.lang.String getHelp()
          Returns the message help.
 java.lang.String getID()
          Returns the message ID.
 byte[] getKey()
          Returns the message key.
 java.lang.String getLibraryName()
          Returns the message file library.
 java.lang.String getPath()
          Returns the full integrated file system path name of the message file.
 MessageQueue getQueue()
          Returns the message queue.
 java.lang.String getReplyStatus()
          Returns the reply status.
 int getSeverity()
          Returns the message severity.
 byte[] getSubstitutionData()
          Returns the substitution data.
 java.lang.String getText()
          Returns the message text with the substitution text inserted.
 int getType()
          Returns the message type.
 java.lang.String getUser()
          Returns the sender user name.
 void load()
          Reloads message help text.
 void load(int helpTextFormatting)
          Reloads message help text.
 java.lang.String toString()
          Returns the message ID and message text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getDate

public java.util.Calendar getDate()
Returns the date and time the message was sent. The returned Calendar object will have the following fields set:
Overrides:
getDate in class AS400Message
Returns:
The date and time the message was sent, or null if not applicable.
See Also:
RQueuedMessage.DATE_SENT

getDefaultReply

public java.lang.String getDefaultReply()
Returns the default reply.
Overrides:
getDefaultReply in class AS400Message
Returns:
The default reply, or null if it is not set.
See Also:
RQueuedMessage.DEFAULT_REPLY

getFileName

public java.lang.String getFileName()
Returns the message file name.
Overrides:
getFileName in class AS400Message
Returns:
The message file name, or null if it is not set.
See Also:
RQueuedMessage.MESSAGE_FILE

getFromProgram

public java.lang.String getFromProgram()
Returns the sending program name.
Returns:
The sending program name, or "" if it is not set.
See Also:
RQueuedMessage.SENDING_PROGRAM_NAME

getFromJobName

public java.lang.String getFromJobName()
Returns the sender job name.
Returns:
The sender job name, or "" if it is not set.
See Also:
RQueuedMessage.SENDER_JOB_NAME

getFromJobNumber

public java.lang.String getFromJobNumber()
Returns the sender job number.
Returns:
The sender job number, or "" if it is not set.
See Also:
RQueuedMessage.SENDER_JOB_NUMBER

getHelp

public java.lang.String getHelp()
Returns the message help.

Message formatting characters may appear in the message help and are defined as follows:

Overrides:
getHelp in class AS400Message
Returns:
The message help, or null if it is not set.
See Also:
RQueuedMessage.MESSAGE_HELP

getID

public java.lang.String getID()
Returns the message ID.
Overrides:
getID in class AS400Message
Returns:
The message ID, or null if it is not set.
See Also:
RQueuedMessage.MESSAGE_ID

getKey

public byte[] getKey()
Returns the message key.
Returns:
The message key, or null if it is not set.
See Also:
RQueuedMessage.MESSAGE_KEY

getLibraryName

public java.lang.String getLibraryName()
Returns the message file library.
Overrides:
getLibraryName in class AS400Message
Returns:
The message file library, or null if it is not set.
See Also:
RQueuedMessage.MESSAGE_FILE

getPath

public java.lang.String getPath()
Returns the full integrated file system path name of the message file.
Overrides:
getPath in class AS400Message
Returns:
The full integrated file system path name of the message file name, or null if it is not set.

getQueue

public MessageQueue getQueue()
Returns the message queue.
Returns:
The message queue, or null if it is not set.

getReplyStatus

public java.lang.String getReplyStatus()
Returns the reply status.
Returns:
The reply status, "" if it is not set, or null if it is not applicable.
See Also:
RQueuedMessage.REPLY_STATUS

getSeverity

public int getSeverity()
Returns the message severity.
Overrides:
getSeverity in class AS400Message
Returns:
The message severity. Valid values are between 0 and 99, or -1 if it is not set.
See Also:
RQueuedMessage.MESSAGE_SEVERITY

getSubstitutionData

public byte[] getSubstitutionData()
Returns the substitution data. This is unconverted data used to fill in the replacement characters in the message.
Overrides:
getSubstitutionData in class AS400Message
Returns:
The subsitution data, or null if not set.
See Also:
RQueuedMessage.SUBSTITUTION_DATA

getText

public java.lang.String getText()
Returns the message text with the substitution text inserted.
Overrides:
getText in class AS400Message
Returns:
The message text, or null if it is not set.
See Also:
RQueuedMessage.MESSAGE_TEXT

getType

public int getType()
Returns the message type.
Overrides:
getType in class AS400Message
Returns:
The message type, or null if it is not set. Valid values are:
  • COMPLETION
  • DIAGNOSTIC
  • INFORMATIONAL
  • INQUIRY
  • SENDERS_COPY
  • REQUEST
  • REQUEST_WITH_PROMPTING
  • NOTIFY
  • ESCAPE
  • REPLY_NOT_VALIDITY_CHECKED
  • REPLY_VALIDITY_CHECKED
  • REPLY_MESSAGE_DEFAULT_USED
  • REPLY_SYSTEM_DEFAULT_USED
  • REPLY_FROM_SYSTEM_REPLY_LIST
See Also:
RQueuedMessage.MESSAGE_TYPE

getUser

public java.lang.String getUser()
Returns the sender user name.
Returns:
The sender user name, or "" if it is not set.
See Also:
RQueuedMessage.SENDER_USER_NAME

load

public void load()
          throws AS400SecurityException,
                 ErrorCompletingRequestException,
                 java.io.IOException,
                 java.lang.InterruptedException,
                 ObjectDoesNotExistException
Reloads message help text.
Overrides:
load in class AS400Message
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
java.io.IOException - If an error occurs while communicating with the AS/400.
java.lang.InterruptedException - If this thread is interrupted.
ObjectDoesNotExistException - If the AS/400 object does not exist.

load

public void load(int helpTextFormatting)
          throws AS400SecurityException,
                 ErrorCompletingRequestException,
                 java.io.IOException,
                 java.lang.InterruptedException,
                 ObjectDoesNotExistException
Reloads message help text.
Overrides:
load in class AS400Message
Parameters:
helpTextFormatting - Formatting performed on the help text. Valid values for this parameter are defined in the MessageFile class. They are no formatting, return formatting characters, and replace (substitute) formatting characters.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
java.io.IOException - If an error occurs while communicating with the AS/400.
java.lang.InterruptedException - If this thread is interrupted.
ObjectDoesNotExistException - If the AS/400 object does not exist.

toString

public java.lang.String toString()
Description copied from class: AS400Message
Returns the message ID and message text.
Overrides:
toString in class AS400Message
Following copied from class: com.ibm.as400.access.AS400Message
Returns:
The message ID and message text.