com.ibm.as400.access

Class QueuedMessage

  • All Implemented Interfaces:
    java.io.Serializable


    public class QueuedMessage
    extends AS400Message
    implements java.io.Serializable
    The QueuedMessage class represents a message on a message queue or job log.
    See Also:
    MessageQueue, JobLog, Serialized Form
    • Method Detail

      • getAlertOption

        public java.lang.String getAlertOption()
        Returns the alert option.
        Overrides:
        getAlertOption in class AS400Message
        Returns:
        The alert option. Possible values are:
        • *DEFER - An alert is sent after local problem analysis.
        • *IMMED - An alert is sent immediately when the message is sent to a message queue that has the allow alerts attribute set to *YES.
        • *NO - No alert is sent.
        • *UNATTEND - An alert is sent immediately when the system is running in unattended mode. See the ALRSTS network attribute.
        • "" - The alert option was not specified when the message was sent.
      • getMessage

        public java.lang.String getMessage()
        Returns the text of a predefined message without replacement data substitution option.If an impromptu message is listed, this field contains the impromptu message text.
        Returns:
        The message without replacement data or an empty string if not set.
      • getMessageHelp

        public java.lang.String getMessageHelp()
        Returns the message help for the message listed without formatting characters and without replacement of data. If an impromptu message is listed, this field contains the impromptu message text.
        Returns:
        The message help for the message listed without formatting characters and without replacement of data or an empty string if not set.
      • getMessageHelpReplacement

        public java.lang.String getMessageHelpReplacement()
        Returns the message help for the message listed, including the replacement data. If an impromptu message is listed, this field contains the impromptu message text.
        Returns:
        The message help for the message listed, including the replacement data or an empty string if not set.
      • getMessageHelpFormat

        public java.lang.String getMessageHelpFormat()
        Returns the message help for the message listed, including the replacement data but without formatting characters. If an impromptu message is listed, this field contains the impromptu message text.
        Returns:
        The message help for the message listed, including the replacement data but without formatting characters or an empty string if not set.
      • getMessageHelpReplacementandFormat

        public java.lang.String getMessageHelpReplacementandFormat()
        Returns the message help for the message listed, including the replacement data and the formatting characters. If an impromptu message is listed, this field contains the impromptu message text.
        Returns:
        The message help for the message listed, including the replacement data and the formatting characters or an empty string if not set.
      • getSenderType

        public java.lang.String getSenderType()
        Returns the type of the sender (whether it is a program or procedure).
        Returns:
        The type of the sender or an empty string if not set. Possible values are:
        • 0 - Sender is an OPM or a System Licensed Internal Code (SLIC) program with a name that is 12 characters or less.
        • 1 - Sender is a procedure within an ILE program and the procedure name is up to and including 256 characters in length.
        • 2 - Sender is a procedure within an ILE program and the procedure name is from 257 characters up to and including 4096 characters in length.
        • 3 - Sender is a SLIC program with a name that is from 13 characters up to and including 256 characters in length.
      • getSendingModuleName

        public java.lang.String getSendingModuleName()
        Returns the name of the module that contains the procedure sending the message. If the message was not sent by a procedure within an ILE program, this field is not set and the length of data field is 0.
        Returns:
        The name of the module that contains the procedure sending the message or an empty string if not set.
      • getSendingProcedureName

        public java.lang.String getSendingProcedureName()
        Returns the name of the procedure sending the message. If the message was not sent by a procedure within an ILE program, this field is not set and the length of data field is 0. A nested procedure name has each procedure name separated by a colon. The outermost procedure name is identified first followed by the procedures it contains. The innermost procedure is identified last in the string.
        Returns:
        The name of the procedure sending the message or an empty string if not set.
      • getSendingUserProfile

        public java.lang.String getSendingUserProfile()
        Returns the name of the user profile that the thread was running under when the message was sent.
        Returns:
        The name of the user profile that the thread was running under or an empty string if not set.
      • getReceivingType

        public java.lang.String getReceivingType()
        Returns the type of the receiver (whether it is a program or a procedure).
        Overrides:
        getReceivingType in class AS400Message
        Returns:
        The type of the receiver or an empty string if not set. Possible values are:
        • 0 - Receiver is an original program model (OPM) program
        • 1 - Receiver is a procedure within an ILE program and the procedure name is up to and including 256 characters in length
        • 2 - Receiver is a procedure within an ILE program and the procedure name is 257 or more characters in length.
      • getReceivingProgramName

        public java.lang.String getReceivingProgramName()
        Returns the program name, or the ILE program name that contains the procedure that the message was sent to.
        Overrides:
        getReceivingProgramName in class AS400Message
        Returns:
        The program name or the ILE program name or an empty string if not set.
      • getReceivingModuleName

        public java.lang.String getReceivingModuleName()
        Returns the name of the module that contains the procedure where the message was sent. If the message was not sent to a procedure within an Integrated Language Environment (ILE) program, this field is not set and the length of data field is 0.
        Returns:
        The name of the module that contains the procedure where the message was sent or an empty string if not set.
      • getReceivingProcedureName

        public java.lang.String getReceivingProcedureName()
        Returns the name of the procedure receiving the message. If the message was not sent to a procedure within an ILE program, this field is not set and the length of data field is 0. A nested procedure name has each procedure name separated by a colon. The outermost procedure name is identified first followed by the procedures it contains. The innermost procedure is identified last in the string.
        Returns:
        The name of the procedure receiving the message or an empty string if not set.
      • getRequestStatus

        public java.lang.String getRequestStatus()
        Returns information regarding the processing status of the request message.
        Returns:
        Information regarding the processing status of the request message or an empty string if not set. Possible values are:
        • O - This request message has been received and processed.
        • C - This request message is currently being processed.
        • N - This request message has not yet been processed.
      • getRequestLevel

        public java.lang.Integer getRequestLevel()
        Returns the level of the request-processing program that received the request message. If the message being listed is not a request, this field is set to 0.
        Returns:
        The level of the request-processing program that received the request message or an empty string if not set.
      • getCcsidCodedCharacterSetIdentifierForText

        public java.lang.Integer getCcsidCodedCharacterSetIdentifierForText()
        Returns the coded character set identifier (CCSID) that the message text is returned in. If a conversion error occurs or if the CCSID you requested in the message text to be converted to is 65535, the CCSID that the message text is stored in is returned. Otherwise, the CCSID you wanted your message text converted to is returned. If you do not want the text converted before it is returned to you but you do want to know the CCSID that the message text is stored in, specify 65535 on the coded character set identifier to return text and data in parameter. The CCSID that the message text is stored in is returned in the coded character set identifier for text field.
        Returns:
        The coded character set identifier (CCSID) that the message text is returned in or null if not set. Possible values are:
        • This applies to the following fields only :
        • * Message
        • * Message with replacement data
        • * Message help
        • * Message help with replacement data
        • * Message help with replacement data and formatting
        • characters
        • * Message help with formatting characters
        • Note: This CCSID value does not apply to the replacement data that has been substituted into the text. See the coded character set identifier for data for this information.
      • getCcsidConversionStatusIndicatorForText

        public java.lang.Integer getCcsidConversionStatusIndicatorForText()
        Returns the CCSID conversion status indicator for text.
        Returns:
        The CCSID conversion status indicator for text or null if not set. Possible values_ are:
        • 0 - No conversion was needed because the CCSID of the text matched the CCSID you wanted the text converted to.
        • 1 - No conversion occurred because either the text was 65535 or the CCSID you wanted the text converted to was 65535.
        • 2 - No conversion occurred because you did not ask for any text to be returned.
        • 3 - The text was converted to the CCSID specified using the best fit conversion tables.
        • 4 - A conversion error occurred using the best fit conversion tables so a default conversion was attempted. This completed without error.
        • -1 - An error occurred on both the best fit and default conversions. The data was not converted.
      • getCcsidCodedCharacterSetIdentifierForData

        public java.lang.Integer getCcsidCodedCharacterSetIdentifierForData()
        Returns the coded character set identifier (CCSID) that the replacement data is returned in. This only applies to the part of the replacement data that corresponds to a convertible character data type (*CCHAR). All other replacement data will not be converted before it is returned and can be considered to have a CCSID of 65535. If a conversion error occurs or if the CCSID you requested the data to be converted to is 65535, the CCSID of the data is returned. If there is no *CCHAR replacement data, 65535 is returned. Otherwise the CCSID you wanted the data converted to is returned.
        Returns:
        The coded character set identifier that the replacement data is returned in or null if not set.
      • getCcsidconversionStatusIndicatorForData

        public java.lang.Integer getCcsidconversionStatusIndicatorForData()
        Returns the CCSID conversion status indicator for data.
        Returns:
        The CCSID conversion status indicator for data or null if not set. Possible values are:
        • 0 - No conversion was needed because the CCSID of the data matched the CCSID that you wanted the data converted to.
        • 1 - No conversion occurred because either the data was 65535, or the CCSID you wanted the data converted to was 65535.
        • 2 - No conversion occurred because you did not ask for any message data to be returned or the data did not contain any *CCHAR type data.
        • 3 - The data was converted to the CCSID specified using the best fit conversion tables.
        • 4 - A conversion error occurred using the best fit conversion tables so a default conversion was attempted. This completed without error.
        • -1 - An error occurred on both the best fit and default conversions. The data was not converted.
      • getSendingStatementNumbers

        public java.lang.String[] getSendingStatementNumbers()
        Returns number of sending statement numbers or instruction numbers available followed by an array of the sending statement numbers or instruction numbers. The number of statement numbers or instruction numbers available for the sending program or procedure. For OPM programs and nonoptimized procedures, this count is 1. For optimized procedures, this count can be greater than 1. In this case, each statement number represents a potential point at which the message could have been sent. If the mapping table information has been removed from the program, this field returns a count of 0, and no statement numbers are available. The array of sending statement numbers or instruction numbers immediately follows this field in the returned data.
        Returns:
        The number of sending statement numbers or instruction numbers available followed by an array of the sending statement numbers or instruction numbers or a null string array is not set.
      • getReceiverStatementNumbers

        public java.lang.String[] getReceiverStatementNumbers()
        Returns the number of statement numbers or instruction numbers available for the receiving program or procedure. For original program model (OPM) programs and nonoptimized procedures, this count is 1.For optimized procedures, this count can be greater than 1. In this case, each statement number represents a potential point at which the message could have been received. If the mapping table information has been removed from the program, this field returns a count of 0 and no statement numbers are available. The array of receiving statement numbers or instruction numbers immediately follows this field in the returned data. return The number of statement numbers or instruction numbers available for the receiving program or procedure or a null string array if nothing is set.
        Returns:
        receiver statement numbers
      • getFromProgram

        public java.lang.String getFromProgram()
        Returns the sending program name.
        Returns:
        The sending program name, or "" if it is not set.
      • getFromJobName

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

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

        public java.lang.String getUser()
        Returns the sender job's user. To get the current user of the message, call getCurrentUser() when accessing a system running V5R3 or higher.
        Returns:
        The sender job's user, or "" if it is not set.
        See Also:
        getFromJobName(), getFromJobNumber()
      • getKey

        public byte[] getKey()
        Returns the 4-byte message key.
        Overrides:
        getKey in class AS400Message
        Returns:
        The message key, 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.
      • getCurrentUser

        public java.lang.String getCurrentUser()
        Returns the current user name. If the system being accessed is running V5R2 or earlier, then "" is returned.
        Returns:
        The current user name, or "" if it is not set.
      • toString

        public java.lang.String toString()
        Returns the String representation of this QueuedMessage object.
        Overrides:
        toString in class AS400Message
        Returns:
        The string.