ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahh_5.4.0.1/vmsgq.htm

102 lines
5.6 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="reference" />
<meta name="DC.Title" content="VMessageQueue class" />
<meta name="abstract" content="" />
<meta name="description" content="" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="vmsgq" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>VMessageQueue class</title>
</head>
<body id="vmsgq"><a name="vmsgq"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">VMessageQueue class</h1>
<div><p></p>
<div class="section"><p>A <a href="javadoc/com/ibm/as400/vaccess/VMessageQueue.html#NAVBAR_TOP"> VMessageQueue</a> object is a resource that
represents the messages in a server message queue for use in <a href="vpanes.htm#vpanes">AS400Panes</a>.</p>
</div>
<div class="section"><p>To use a VMessageQueue, set the system and path properties. These
properties can be set using a constructor or through the <a href="javadoc/com/ibm/as400/vaccess/VMessageQueue.html#SETSYSTEM(COM.IBM.AS400.ACCESS.AS400)"> setSystem()</a> and <a href="javadoc/com/ibm/as400/vaccess/VMessageQueue.html#SETPATH(JAVA.LANG.STRING)"> setPath()</a> methods. The VMessageQueue object
is then "plugged" into the AS400Pane as the root by using the constructor
or setRoot() method of the AS400Pane.</p>
</div>
<div class="section"><p>VMessageQueue has some other useful properties for defining the
set of messages that are presented in AS400Panes. Use <a href="javadoc/com/ibm/as400/vaccess/VMessageQueue.html#SETSEVERITY(INT)"> setSeverity()</a> to specify the severity of
messages that appear. Use <a href="javadoc/com/ibm/as400/vaccess/VMessageQueue.html#SETSELECTION(JAVA.LANG.STRING)"> setSelection()</a> to specify the type of messages
that appear.</p>
</div>
<div class="section"><p>When AS400Pane and VMessageQueue objects are created, they are
initialized to a default state. The list of messages is not loaded at creation
time. To load the contents, the caller must explicitly call the load() method
on either object. This will initiate communication to the server to gather
the contents of the list.</p>
</div>
<div class="section"><p>At run-time, a user can perform actions on a message or message
queue by right-clicking it to display the context menu. The context menu
for message queues can include the following items:</p>
</div>
<div class="section"><ul><li><strong>Clear</strong> - clears the message queue</li>
<li><strong>Properties</strong> - allows the user to set the severity and selection
properties. This may be used to change the contents of the list</li>
</ul>
</div>
<div class="section"><p>The following action is available for messages on a message queue: </p>
</div>
<div class="section"><ul><li><strong>Remove</strong> - removes the message from the message queue</li>
<li><strong>Reply</strong> - replies to an inquiry message</li>
<li><strong>Properties</strong> - displays properties such as the severity, type, and
date</li>
</ul>
</div>
<div class="section"><p>Of course, users can only access message queues to which they
are authorized. In addition, the caller can prevent the user from performing
actions by using the setAllowActions() method on the pane.</p>
</div>
<div class="section"><p>The following example creates a VMessageQueue and presents it
in an AS400ExplorerPane:</p>
</div>
<div class="section"><div class="p"><pre> // Create the VMessageQueue object.
// Assume that "system" is an AS400
// object created and initialized
// elsewhere.
VMessageQueue root = new VMessageQueue (system, "/QSYS.LIB/MYLIB.LIB/MYMSGQ.MSGQ");
// Create and load an
// AS400ExplorerPane object.
AS400ExplorerPane explorerPane = new AS400ExplorerPane (root);
explorerPane.load ();
// Add the explorer pane to a frame.
// Assume that "frame" is a JFrame
// created elsewhere.
frame.getContentPane ().add (explorerPane);</pre>
<strong>Example</strong></div>
</div>
<div class="section"><p>Present the list of messages in a message queue using an AS400ExplorerPane
with a <a href="vmessagequeueexample.htm#vmessagequeueexample">VMessageQueue</a> object.
Figure 1 shows the VMessageQueue graphical user interface component:</p>
</div>
<div class="section"><p><strong>Figure 1: VMessageQueue GUI component</strong></p>
</div>
<div class="section"><p><img src="rzahh091.gif" alt="VMessageQueue GUI component" /></p>
</div>
</div>
</body>
</html>