com.ibm.as400.resource
Class RQueuedMessage

java.lang.Object
  |
  +--com.ibm.as400.resource.Resource
        |
        +--com.ibm.as400.resource.RQueuedMessage
All Implemented Interfaces:
java.io.Serializable

public class RQueuedMessage
extends Resource

The RQueuedMessage class represents a message in an AS/400 message queue or job log.

The following attribute IDs are supported:

Use any of these attribute IDs with getAttributeValue() to access the attribute values for an RQueuedMessage.

// Create an RMessageQueue object to refer to a specific message queue.
AS400 system = new AS400("MYSYSTEM", "MYUSERID", "MYPASSWORD");
RMessageQueue messageQueue = new RMessageQueue(system, "/QSYS.LIB/MYLIB.LIB/MYMSGQ.MSGQ");

// Get the first RQueuedMessage from the RMessageQueue. RQueuedMessage queuedMessage = messageQueue.resourceAt(0);
// Get the message text from the RQueuedMessage. String messageText = (String)queuedMessage.getAttributeValue(RQueuedMessage.MESSAGE_TEXT);

See Also:
RMessageQueue, RJobLog, Serialized Form

Field Summary
static java.lang.String ALERT_OPTION
          Attribute ID for alert option.
static java.lang.String ALERT_OPTION_DEFER
          Constant for ALERT_OPTION attribute value - An alert is sent after local problem analysis.
static java.lang.String ALERT_OPTION_IMMEDIATE
          Constant for ALERT_OPTION attribute value - An alert is sent immediately when the message is sent to a message queue that has the allows alerts.
static java.lang.String ALERT_OPTION_NO
          Constant for ALERT_OPTION attribute value - No alert is sent.
static java.lang.String ALERT_OPTION_UNATTENDED
          Constant for ALERT_OPTION attribute value - An alert is sent immediately when the system is running in unattended mode.
static java.lang.String DATE_SENT
          Attribute ID for date sent.
static java.lang.String DEFAULT_REPLY
          Attribute ID for default reply.
static java.lang.String MESSAGE_FILE
          Attribute ID for message file.
static java.lang.String MESSAGE_HELP
          Attribute ID for message help.
static java.lang.String MESSAGE_ID
          Attribute ID for message ID.
static java.lang.String MESSAGE_KEY
          Attribute ID for message key.
static java.lang.String MESSAGE_QUEUE
          Attribute ID for message queue.
static java.lang.String MESSAGE_SEVERITY
          Attribute ID for message severity.
static java.lang.String MESSAGE_TEXT
          Attribute ID for message text.
static java.lang.String MESSAGE_TYPE
          Attribute ID for message type.
static java.lang.String REPLY_STATUS
          Attribute ID for reply status.
static java.lang.String REPLY_STATUS_ACCEPTS_NOT_SENT
          Constant for REPLY_STATUS attribute value - Message accepts a reply, and a reply has not been sent.
static java.lang.String REPLY_STATUS_ACCEPTS_SENT
          Constant for REPLY_STATUS attribute value - Message accepts a reply, and a reply has been sent.
static java.lang.String REPLY_STATUS_NOT_ACCEPT
          Constant for REPLY_STATUS attribute value - Message does not accept a reply.
static java.lang.String SENDER_JOB_NAME
          Attribute ID for sender job name.
static java.lang.String SENDER_JOB_NUMBER
          Attribute ID for sender job number.
static java.lang.String SENDER_USER_NAME
          Attribute ID for sender user name.
static java.lang.String SENDING_PROGRAM_NAME
          Attribute ID for sending program name.
static java.lang.String SUBSTITUTION_DATA
          Attribute ID for substitution data.
 
Constructor Summary
RQueuedMessage()
          Constructs an RQueuedMessage object.
 
Method Summary
 void load(int helpTextFormatting)
          Reload message help text.
 
Methods inherited from class com.ibm.as400.resource.Resource
addActiveStatusListener, addPropertyChangeListener, addResourceListener, addVetoableChangeListener, arePropertiesFrozen, equals, establishConnection, fireAttributeValuesRefreshed, fireBusy, fireIdle, firePropertyChange, fireVetoableChange, freezeProperties, getAttributeMetaData, getAttributeMetaData, getAttributeValue, getAttributeValue, getPresentation, getResourceKey, getSystem, initializeAttributeValue, isBidiEnabled, isConnectionEstablished, refreshAttributeValues, removeActiveStatusListener, removePropertyChangeListener, removeResourceListener, removeVetoableChangeListener, setPresentation, setResourceKey, setSystem, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALERT_OPTION

public static final java.lang.String ALERT_OPTION
Attribute ID for alert option. This identifies a read-only String attribute, which represents whether and when an SNA alert is created and sent for the message. Possible values are:

ALERT_OPTION_DEFER

public static final java.lang.String ALERT_OPTION_DEFER
Constant for ALERT_OPTION attribute value - An alert is sent after local problem analysis.

ALERT_OPTION_IMMEDIATE

public static final java.lang.String ALERT_OPTION_IMMEDIATE
Constant for ALERT_OPTION attribute value - An alert is sent immediately when the message is sent to a message queue that has the allows alerts.

ALERT_OPTION_NO

public static final java.lang.String ALERT_OPTION_NO
Constant for ALERT_OPTION attribute value - No alert is sent.

ALERT_OPTION_UNATTENDED

public static final java.lang.String ALERT_OPTION_UNATTENDED
Constant for ALERT_OPTION attribute value - An alert is sent immediately when the system is running in unattended mode.

DATE_SENT

public static final java.lang.String DATE_SENT
Attribute ID for date sent. This identifies a read-only Date attribute, which represents the date and time on which the message was sent. The Date value is converted using the default Java locale.

DEFAULT_REPLY

public static final java.lang.String DEFAULT_REPLY
Attribute ID for default reply. This identifies a read-only String attribute, which represents the text of the default reply when a stored message is being listed, and a default reply exists.

MESSAGE_FILE

public static final java.lang.String MESSAGE_FILE
Attribute ID for message file. This identifies a read-only String attribute, which represents the fully qualified integrated file system path name of the message file containing the message.
See Also:
QSYSObjectPathName

MESSAGE_HELP

public static final java.lang.String MESSAGE_HELP
Attribute ID for message help. This identifies a read-only String attribute, which represents the message help.

MESSAGE_ID

public static final java.lang.String MESSAGE_ID
Attribute ID for message ID. This identifies a read-only String attribute, which represents the message identifier.

MESSAGE_KEY

public static final java.lang.String MESSAGE_KEY
Attribute ID for message key. This identifies a read-only byte array attribute, which represents the message key.

MESSAGE_QUEUE

public static final java.lang.String MESSAGE_QUEUE
Attribute ID for message queue. This identifies a read-only String attribute, which represents the fully qualified integrated file system path name of the message queue.
See Also:
QSYSObjectPathName

MESSAGE_SEVERITY

public static final java.lang.String MESSAGE_SEVERITY
Attribute ID for message severity. This identifies a read-only Integer attribute, which represents the severity of the message. Possible values are 0 through 99.

MESSAGE_TEXT

public static final java.lang.String MESSAGE_TEXT
Attribute ID for message text. This identifies a read-only String attribute, which represents the message text.

MESSAGE_TYPE

public static final java.lang.String MESSAGE_TYPE
Attribute ID for message type. This identifies a read-only Integer attribute, which represents the message type. Converted to an int, the possible values are:

REPLY_STATUS

public static final java.lang.String REPLY_STATUS
Attribute ID for reply status. This identifies a read-only String attribute, which represents the reply status of the message. Possible values are:

REPLY_STATUS_ACCEPTS_SENT

public static final java.lang.String REPLY_STATUS_ACCEPTS_SENT
Constant for REPLY_STATUS attribute value - Message accepts a reply, and a reply has been sent.

REPLY_STATUS_ACCEPTS_NOT_SENT

public static final java.lang.String REPLY_STATUS_ACCEPTS_NOT_SENT
Constant for REPLY_STATUS attribute value - Message accepts a reply, and a reply has not been sent. (The message is waiting for a reply.)

REPLY_STATUS_NOT_ACCEPT

public static final java.lang.String REPLY_STATUS_NOT_ACCEPT
Constant for REPLY_STATUS attribute value - Message does not accept a reply.

SENDER_JOB_NAME

public static final java.lang.String SENDER_JOB_NAME
Attribute ID for sender job name. This identifies a read-only String attribute, which represents the job name of the sender.

SENDER_USER_NAME

public static final java.lang.String SENDER_USER_NAME
Attribute ID for sender user name. This identifies a read-only String attribute, which represents the user name of the sender.

SENDER_JOB_NUMBER

public static final java.lang.String SENDER_JOB_NUMBER
Attribute ID for sender job number. This identifies a read-only String attribute, which represents the job number of the sender.

SENDING_PROGRAM_NAME

public static final java.lang.String SENDING_PROGRAM_NAME
Attribute ID for sending program name. This identifies a read-only String attribute, which represents the sending program name or ILE program name that contains the procedure sending the message.

SUBSTITUTION_DATA

public static final java.lang.String SUBSTITUTION_DATA
Attribute ID for substitution data. This identifies a read-only byte array attribute, which represents the values for subsitution variables in a predefined message, or the text of an impromptu message.
Constructor Detail

RQueuedMessage

public RQueuedMessage()
Constructs an RQueuedMessage object.
Method Detail

load

public void load(int helpTextFormatting)
          throws AS400SecurityException,
                 ErrorCompletingRequestException,
                 java.io.IOException,
                 java.lang.InterruptedException,
                 ObjectDoesNotExistException
Reload message help text.
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.