blob: 47c66006ec9076b5d3a585b086da23314143c9cb [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>Message</title>
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Message";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6,"i16":6,"i17":6,"i18":6,"i19":6,"i20":6,"i21":6,"i22":6,"i23":6,"i24":6,"i25":6,"i26":6,"i27":6,"i28":6,"i29":6,"i30":6,"i31":6,"i32":6,"i33":6,"i34":6,"i35":6,"i36":6,"i37":6,"i38":6,"i39":6,"i40":6,"i41":6,"i42":6,"i43":6,"i44":6,"i45":6,"i46":6,"i47":6,"i48":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../jakarta/jms/MapMessage.html" title="interface in jakarta.jms"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../jakarta/jms/MessageConsumer.html" title="interface in jakarta.jms"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?jakarta/jms/Message.html" target="_top">Frames</a></li>
<li><a href="Message.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">jakarta.jms</div>
<h2 title="Interface Message" class="title">Interface Message</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Subinterfaces:</dt>
<dd><a href="../../jakarta/jms/BytesMessage.html" title="interface in jakarta.jms">BytesMessage</a>, <a href="../../jakarta/jms/MapMessage.html" title="interface in jakarta.jms">MapMessage</a>, <a href="../../jakarta/jms/ObjectMessage.html" title="interface in jakarta.jms">ObjectMessage</a>, <a href="../../jakarta/jms/StreamMessage.html" title="interface in jakarta.jms">StreamMessage</a>, <a href="../../jakarta/jms/TextMessage.html" title="interface in jakarta.jms">TextMessage</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">Message</span></pre>
<div class="block">The <code>Message</code> interface is the root interface of all Jakarta Messaging messages. It defines the message header and the
<code>acknowledge</code> method used for all messages.
<p>
Most message-oriented middleware (MOM) products treat messages as lightweight entities that consist of a header and a
body. The header contains fields used for message routing and identification; the body contains the application data
being sent.
<p>
Within this general form, the definition of a message varies significantly across products. It would be quite
difficult for the Jakarta Messaging API to support all of these message models.
<p>
With this in mind, the Jakarta Messaging message model has the following goals:
<ul>
<li>Provide a single, unified message API
<li>Provide an API suitable for creating messages that match the format used by provider-native messaging
applications
<li>Support the development of heterogeneous applications that span operating systems, machine architectures, and
computer languages
<li>Support messages containing objects in the Java programming language ("Java objects")
<li>Support messages containing Extensible Markup Language (XML) pages
</ul>
<p>
Jakarta Messaging messages are composed of the following parts:
<ul>
<li>Header - All messages support the same set of header fields. Header fields contain values used by both clients
and providers to identify and route messages.
<li>Properties - Each message contains a built-in facility for supporting application-defined property values.
Properties provide an efficient mechanism for supporting application-defined message filtering.
<li>Body - The Jakarta Messaging API defines several types of message body, which cover the majority of messaging styles currently
in use.
</ul>
<h3>Message Bodies</h3>
<p>
The Jakarta Messaging API defines five types of message body:
<ul>
<li>Stream - A <code>StreamMessage</code> object's message body contains a stream of primitive values in the Java
programming language ("Java primitives"). It is filled and read sequentially.
<li>Map - A <code>MapMessage</code> object's message body contains a set of name-value pairs, where names are
<code>String</code> objects, and values are Java primitives. The entries can be accessed sequentially or randomly by name.
The order of the entries is undefined.
<li>Text - A <code>TextMessage</code> object's message body contains a <code>java.lang.String</code> object. This message type
can be used to transport plain-text messages, and XML messages.
<li>Object - An <code>ObjectMessage</code> object's message body contains a <code>Serializable</code> Java object.
<li>Bytes - A <code>BytesMessage</code> object's message body contains a stream of uninterpreted bytes. This message type
is for literally encoding a body to match an existing message format. In many cases, it is possible to use one of the
other body types, which are easier to use. Although the Jakarta Messaging API allows the use of message properties with byte
messages, they are typically not used, since the inclusion of properties may affect the format.
</ul>
<h3>Message Headers</h3>
<p>
The <code>JMSCorrelationID</code> header field is used for linking one message with another. It typically links a reply
message with its requesting message.
<p>
<code>JMSCorrelationID</code> can hold a provider-specific message ID, an application-specific <code>String</code> object, or a
provider-native <code>byte[]</code> value.
<h3>Message Properties</h3>
<p>
A <code>Message</code> object contains a built-in facility for supporting application-defined property values. In effect,
this provides a mechanism for adding application-specific header fields to a message.
<p>
Properties allow an application, via message selectors, to have a Jakarta Messaging provider select, or filter, messages on its
behalf using application-specific criteria.
<p>
Property names must obey the rules for a message selector identifier. Property names must not be null, and must not
be empty strings. If a property name is set and it is either null or an empty string, an
<code>IllegalArgumentException</code> must be thrown.
<p>
Property values can be <code>boolean</code>, <code>byte</code>, <code>short</code>, <code>int</code>, <code>long</code>, <code>float</code>,
<code>double</code>, and <code>String</code>.
<p>
Property values are set prior to sending a message. When a client receives a message, its properties are in read-only
mode. If a client attempts to set properties at this point, a <code>MessageNotWriteableException</code> is thrown. If
<code>clearProperties</code> is called, the properties can now be both read from and written to. Note that header fields
are distinct from properties. Header fields are never in read-only mode.
<p>
A property value may duplicate a value in a message's body, or it may not. Although Jakarta Messaging does not define a policy for
what should or should not be made a property, application developers should note that Jakarta Messaging providers will likely
handle data in a message's body more efficiently than data in a message's properties. For best performance,
applications should use message properties only when they need to customize a message's header. The primary reason
for doing this is to support customized message selection.
<p>
Message properties support the following conversion table. The marked cases must be supported. The unmarked cases
must throw a <code>JMSException</code>. The <code>String</code>-to-primitive conversions may throw a runtime exception if the
primitive's <code>valueOf</code> method does not accept the <code>String</code> as a valid representation of the primitive.
<p>
A value written as the row type can be read as the column type.
<pre>
| | boolean byte short int long float double String
|----------------------------------------------------------
|boolean | X X
|byte | X X X X X
|short | X X X X
|int | X X X
|long | X X
|float | X X X
|double | X X
|String | X X X X X X X X
|----------------------------------------------------------
</pre>
<p>
In addition to the type-specific set/get methods for properties, Jakarta Messaging provides the <code>setObjectProperty</code> and
<code>getObjectProperty</code> methods. These support the same set of property types using the objectified primitive
values. Their purpose is to allow the decision of property type to made at execution time rather than at compile
time. They support the same property value conversions.
<p>
The <code>setObjectProperty</code> method accepts values of class <code>Boolean</code>, <code>Byte</code>, <code>Short</code>,
<code>Integer</code>, <code>Long</code>, <code>Float</code>, <code>Double</code>, and <code>String</code>. An attempt to use any other class
must throw a <code>JMSException</code>.
<p>
The <code>getObjectProperty</code> method only returns values of class <code>Boolean</code>, <code>Byte</code>, <code>Short</code>,
<code>Integer</code>, <code>Long</code>, <code>Float</code>, <code>Double</code>, and <code>String</code>.
<p>
The order of property values is not defined. To iterate through a message's property values, use
<code>getPropertyNames</code> to retrieve a property name enumeration and then use the various property get methods to
retrieve their values.
<p>
A message's properties are deleted by the <code>clearProperties</code> method. This leaves the message with an empty set
of properties.
<p>
Getting a property value for a name which has not been set returns a null value. Only the <code>getStringProperty</code>
and <code>getObjectProperty</code> methods can return a null value. Attempting to read a null value as a primitive type
must be treated as calling the primitive's corresponding <code>valueOf(String)</code> conversion method with a null value.
<p>
The Jakarta Messaging API reserves the <code>JMSX</code> property name prefix for Jakarta Messaging defined properties. The full set of these
properties is defined in the Jakarta Messaging specification. The specification also defines whether support for
each property is mandatory or optional. New Jakarta Messaging defined properties may be added in later versions of the Jakarta Messaging API. The
<code>String[] ConnectionMetaData.getJMSXPropertyNames</code> method returns the names of the JMSX properties supported by
a connection.
<p>
JMSX properties may be referenced in message selectors whether or not they are supported by a connection. If they are
not present in a message, they are treated like any other absent property. The effect of setting a message selector
on a property which is set by the provider on receive is undefined.
<p>
JMSX properties defined in the specification as "set by provider on send" are available to both the producer and the
consumers of the message. JMSX properties defined in the specification as "set by provider on receive" are available
only to the consumers.
<p>
<code>JMSXGroupID</code> and <code>JMSXGroupSeq</code> are standard properties that clients should use if they want to group
messages. All providers must support them. Unless specifically noted, the values and semantics of the JMSX properties
are undefined.
<p>
The Jakarta Messaging API reserves the <code>JMS_<I>vendor_name</I></code> property name prefix for provider-specific properties.
Each provider defines its own value for <code><I>vendor_name</I></code>. This is the mechanism a Jakarta Messaging provider uses to
make its special per-message services available to a Jakarta Messaging client.
<p>
The purpose of provider-specific properties is to provide special features needed to integrate Jakarta Messaging clients with
provider-native clients in a single Jakarta Messaging application. They should not be used for messaging between Jakarta Messaging clients.
<h3>Provider Implementations of Jakarta Messaging Message Interfaces</h3>
<p>
The Jakarta Messaging API provides a set of message interfaces that define the Jakarta Messaging message model. It does not provide
implementations of these interfaces.
<p>
Each Jakarta Messaging provider supplies a set of message factories with its <code>Session</code> object for creating instances of
messages. This allows a provider to use message implementations tailored to its specific needs.
<p>
A provider must be prepared to accept message implementations that are not its own. They may not be handled as
efficiently as its own implementation; however, they must be handled.
<p>
Note the following exception case when a provider is handling a foreign message implementation. If the foreign
message implementation contains a <code>JMSReplyTo</code> header field that is set to a foreign destination
implementation, the provider is not required to handle or preserve the value of this header field.
<h3>Message Selectors</h3>
<p>
A Jakarta Messaging message selector allows a client to specify, by header field references and property references, the messages
it is interested in. Only messages whose header and property values match the selector are delivered. What it means
for a message not to be delivered depends on the <code>MessageConsumer</code> being used (see
<a href="../../jakarta/jms/QueueReceiver.html" title="interface in jakarta.jms"><code>QueueReceiver</code></a> and <a href="../../jakarta/jms/TopicSubscriber.html" title="interface in jakarta.jms"><code>TopicSubscriber</code></a>).
<p>
Message selectors cannot reference message body values.
<p>
A message selector matches a message if the selector evaluates to true when the message's header field values and
property values are substituted for their corresponding identifiers in the selector.
<p>
A message selector is a <code>String</code> whose syntax is based on a subset of the SQL92 conditional expression syntax.
If the value of a message selector is an empty string, the value is treated as a null and indicates that there is no
message selector for the message consumer.
<p>
The order of evaluation of a message selector is from left to right within precedence level. Parentheses can be used
to change this order.
<p>
Predefined selector literals and operator names are shown here in uppercase; however, they are case insensitive.
<p>
A selector can contain:
<ul>
<li>Literals:
<ul>
<li>A string literal is enclosed in single quotes, with a single quote represented by doubled single quote; for
example, <code>'literal'</code> and <code>'literal''s'</code>. Like string literals in the Java programming language, these use
the Unicode character encoding.
<li>An exact numeric literal is a numeric value without a decimal point, such as <code>57</code>, <code>-957</code>, and
<code>+62</code>; numbers in the range of <code>long</code> are supported. Exact numeric literals use the integer literal
syntax of the Java programming language.
<li>An approximate numeric literal is a numeric value in scientific notation, such as <code>7E3</code> and
<code>-57.9E2</code>, or a numeric value with a decimal, such as <code>7.</code>, <code>-95.7</code>, and <code>+6.2</code>; numbers in
the range of <code>double</code> are supported. Approximate literals use the floating-point literal syntax of the Java
programming language.
<li>The boolean literals <code>TRUE</code> and <code>FALSE</code>.
</ul>
<li>Identifiers:
<ul>
<li>An identifier is an unlimited-length sequence of letters and digits, the first of which must be a letter. A
letter is any character for which the method <code>Character.isJavaLetter</code> returns true. This includes <code>'_'</code>
and <code>'$'</code>. A letter or digit is any character for which the method <code>Character.isJavaLetterOrDigit</code>
returns true.
<li>Identifiers cannot be the names <code>NULL</code>, <code>TRUE</code>, and <code>FALSE</code>.
<li>Identifiers cannot be <code>NOT</code>, <code>AND</code>, <code>OR</code>, <code>BETWEEN</code>, <code>LIKE</code>, <code>IN</code>,
<code>IS</code>, or <code>ESCAPE</code>.
<li>Identifiers are either header field references or property references. The type of a property value in a message
selector corresponds to the type used to set the property. If a property that does not exist in a message is
referenced, its value is <code>NULL</code>.
<li>The conversions that apply to the get methods for properties do not apply when a property is used in a message
selector expression. For example, suppose you set a property as a string value, as in the following:
<pre>
myMessage.setStringProperty("NumberOfOrders", "2");
</pre>
The following expression in a message selector would evaluate to false, because a string cannot be used in an
arithmetic expression:
<pre>
"NumberOfOrders &gt; 1"
</pre>
<li>Identifiers are case-sensitive.
<li>Message header field references are restricted to <code>JMSDeliveryMode</code>, <code>JMSPriority</code>,
<code>JMSMessageID</code>, <code>JMSTimestamp</code>, <code>JMSCorrelationID</code>, and <code>JMSType</code>. <code>JMSMessageID</code>,
<code>JMSCorrelationID</code>, and <code>JMSType</code> values may be null and if so are treated as a <code>NULL</code> value.
<li>Any name beginning with <code>'JMSX'</code> is a Jakarta Messaging defined property name.
<li>Any name beginning with <code>'JMS_'</code> is a provider-specific property name.
<li>Any name that does not begin with <code>'JMS'</code> is an application-specific property name.
</ul>
<li>White space is the same as that defined for the Java programming language: space, horizontal tab, form feed, and
line terminator.
<li>Expressions:
<ul>
<li>A selector is a conditional expression; a selector that evaluates to <code>true</code> matches; a selector that
evaluates to <code>false</code> or unknown does not match.
<li>Arithmetic expressions are composed of themselves, arithmetic operations, identifiers (whose value is treated as
a numeric literal), and numeric literals.
<li>Conditional expressions are composed of themselves, comparison operations, and logical operations.
</ul>
<li>Standard bracketing <code>()</code> for ordering expression evaluation is supported.
<li>Logical operators in precedence order: <code>NOT</code>, <code>AND</code>, <code>OR</code>
<li>Comparison operators: <code>=</code>, <code>&gt;</code>, <code>&gt;=</code>, <code>&lt;</code>, <code>&lt;=</code>, <code>&lt;&gt;</code> (not equal)
<ul>
<li>Only like type values can be compared. One exception is that it is valid to compare exact numeric values and
approximate numeric values; the type conversion required is defined by the rules of numeric promotion in the Java
programming language. If the comparison of non-like type values is attempted, the value of the operation is false. If
either of the type values evaluates to <code>NULL</code>, the value of the expression is unknown.
<li>String and boolean comparison is restricted to <code>=</code> and <code>&lt;&gt;</code>. Two strings are equal if and only if
they contain the same sequence of characters.
</ul>
<li>Arithmetic operators in precedence order:
<ul>
<li><code>+</code>, <code>-</code> (unary)
<li><code>*</code>, <code>/</code> (multiplication and division)
<li><code>+</code>, <code>-</code> (addition and subtraction)
<li>Arithmetic operations must use numeric promotion in the Java programming language.
</ul>
<li><code><I>arithmetic-expr1</I> [NOT] BETWEEN <I>arithmetic-expr2</I>
AND <I>arithmetic-expr3</I></code> (comparison operator)
<ul>
<li><code>"age&nbsp;BETWEEN&nbsp;15&nbsp;AND&nbsp;19"</code> is equivalent to
<code>"age&nbsp;&gt;=&nbsp;15&nbsp;AND&nbsp;age&nbsp;&lt;=&nbsp;19"</code>
<li><code>"age&nbsp;NOT&nbsp;BETWEEN&nbsp;15&nbsp;AND&nbsp;19"</code> is equivalent to
<code>"age&nbsp;&lt;&nbsp;15&nbsp;OR&nbsp;age&nbsp;&gt;&nbsp;19"</code>
</ul>
<li><code><I>identifier</I> [NOT] IN (<I>string-literal1</I>,
<I>string-literal2</I>,...)</code> (comparison operator where <code><I>identifier</I></code> has a
<code>String</code> or <code>NULL</code> value)
<ul>
<li><code>"Country&nbsp;IN&nbsp;('&nbsp;UK',&nbsp;'US',&nbsp;'France')"</code> is true for <code>'UK'</code> and
false for <code>'Peru'</code>; it is equivalent to the expression
<code>"(Country&nbsp;=&nbsp;'&nbsp;UK')&nbsp;OR&nbsp;(Country&nbsp;=&nbsp;'&nbsp;US')&nbsp;OR&nbsp;(Country&nbsp;=&nbsp;'&nbsp;France')"</code>
<li><code>"Country&nbsp;NOT&nbsp;IN&nbsp;('&nbsp;UK',&nbsp;'US',&nbsp;'France')"</code> is false for
<code>'UK'</code> and true for <code>'Peru'</code>; it is equivalent to the expression
<code>"NOT&nbsp;((Country&nbsp;=&nbsp;'&nbsp;UK')&nbsp;OR&nbsp;(Country&nbsp;=&nbsp;'&nbsp;US')&nbsp;OR&nbsp;(Country&nbsp;=&nbsp;'&nbsp;France'))"</code>
<li>If identifier of an <code>IN</code> or <code>NOT IN</code> operation is <code>NULL</code>, the value of the
operation is unknown.
</ul>
<li><code><I>identifier</I> [NOT] LIKE <I>pattern-value</I> [ESCAPE
<I>escape-character</I>]</code> (comparison operator, where <code><I>identifier</I></code> has a
<code>String</code> value; <code><I>pattern-value</I></code> is a string literal where <code>'_'</code> stands for
any single character; <code>'%'</code> stands for any sequence of characters, including the empty sequence; and all
other characters stand for themselves. The optional <code><I>escape-character</I></code> is a single-character string
literal whose character is used to escape the special meaning of the <code>'_'</code> and <code>'%'</code> in
<code><I>pattern-value</I></code>.)
<ul>
<li><code>"phone&nbsp;LIKE&nbsp;'12%3'"</code> is true for <code>'123'</code> or <code>'12993'</code> and false for
<code>'1234'</code>
<li><code>"word&nbsp;LIKE&nbsp;'l_se'"</code> is true for <code>'lose'</code> and false for <code>'loose'</code>
<li><code>"underscored&nbsp;LIKE&nbsp;'\_%'&nbsp;ESCAPE&nbsp;'\'"</code> is true for <code>'_foo'</code> and false
for <code>'bar'</code>
<li><code>"phone&nbsp;NOT&nbsp;LIKE&nbsp;'12%3'"</code> is false for <code>'123'</code> or <code>'12993'</code> and
true for <code>'1234'</code>
<li>If <code><I>identifier</I></code> of a <code>LIKE</code> or <code>NOT LIKE</code> operation is <code>NULL</code>,
the value of the operation is unknown.
</ul>
<li><code><I>identifier</I> IS NULL</code> (comparison operator that tests for a null header field value or a missing
property value)
<ul>
<li><code>"prop_name&nbsp;IS&nbsp;NULL"</code>
</ul>
<li><code><I>identifier</I> IS NOT NULL</code> (comparison operator that tests for the existence of a non-null header
field value or a property value)
<ul>
<li><code>"prop_name&nbsp;IS&nbsp;NOT&nbsp;NULL"</code>
</ul>
</ul>
<p>
Jakarta Messaging providers are required to verify the syntactic correctness of a message selector at the time it is presented. A
method that provides a syntactically incorrect selector must result in a <code>JMSException</code>. Jakarta Messaging providers may also
optionally provide some semantic checking at the time the selector is presented. Not all semantic checking can be
performed at the time a message selector is presented, because property types are not known.
<p>
The following message selector selects messages with a message type of car and color of blue and weight greater than
2500 pounds:
<pre>
"JMSType&nbsp;=&nbsp;'car'&nbsp;AND&nbsp;color&nbsp;=&nbsp;'blue'&nbsp;AND&nbsp;weight&nbsp;&gt;&nbsp;2500"
</pre>
<h3>Null Values</h3>
<p>
As noted above, property values may be <code>NULL</code>. The evaluation of selector expressions containing <code>NULL</code>
values is defined by SQL92 <code>NULL</code> semantics. A brief description of these semantics is provided here.
<p>
SQL treats a <code>NULL</code> value as unknown. Comparison or arithmetic with an unknown value always yields an unknown
value.
<p>
The <code>IS NULL</code> and <code>IS NOT NULL</code> operators convert an unknown value into the respective <code>TRUE</code> and
<code>FALSE</code> values.
<p>
The boolean operators use three-valued logic as defined by the following tables:
<p>
<B>The definition of the <code>AND</code> operator</B>
<pre>
| AND | T | F | U
+------+-------+-------+-------
| T | T | F | U
| F | F | F | F
| U | U | F | U
+------+-------+-------+-------
</pre>
<p>
<B>The definition of the <code>OR</code> operator</B>
<pre>
| OR | T | F | U
+------+-------+-------+--------
| T | T | T | T
| F | T | F | U
| U | T | U | U
+------+-------+-------+-------
</pre>
<p>
<B>The definition of the <code>NOT</code> operator</B>
<pre>
| NOT
+------+------
| T | F
| F | T
| U | U
+------+-------
</pre>
<h3>Special Notes</h3>
<p>
When used in a message selector, the <code>JMSDeliveryMode</code> header field is treated as having the values
<code>'PERSISTENT'</code> and <code>'NON_PERSISTENT'</code>.
<p>
Date and time values should use the standard <code>long</code> millisecond value. When a date or time literal is included
in a message selector, it should be an integer literal for a millisecond value. The standard way to produce
millisecond values is to use <code>java.util.Calendar</code>.
<p>
Although SQL supports fixed decimal comparison and arithmetic, Jakarta Messaging message selectors do not. This is the reason for
restricting exact numeric literals to those without a decimal (and the addition of numerics with a decimal as an
alternate representation for approximate numeric values).
<p>
SQL comments are not supported.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JMS 1.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/MessageConsumer.html#receive--"><code>MessageConsumer.receive()</code></a>,
<a href="../../jakarta/jms/MessageConsumer.html#receive-long-"><code>MessageConsumer.receive(long)</code></a>,
<a href="../../jakarta/jms/MessageConsumer.html#receiveNoWait--"><code>MessageConsumer.receiveNoWait()</code></a>,
<a href="../../jakarta/jms/MessageListener.html#onMessage-jakarta.jms.Message-"><code>MessageListener.onMessage(Message)</code></a>,
<a href="../../jakarta/jms/BytesMessage.html" title="interface in jakarta.jms"><code>BytesMessage</code></a>,
<a href="../../jakarta/jms/MapMessage.html" title="interface in jakarta.jms"><code>MapMessage</code></a>,
<a href="../../jakarta/jms/ObjectMessage.html" title="interface in jakarta.jms"><code>ObjectMessage</code></a>,
<a href="../../jakarta/jms/StreamMessage.html" title="interface in jakarta.jms"><code>StreamMessage</code></a>,
<a href="../../jakarta/jms/TextMessage.html" title="interface in jakarta.jms"><code>TextMessage</code></a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#DEFAULT_DELIVERY_DELAY">DEFAULT_DELIVERY_DELAY</a></span></code>
<div class="block">The message producer's default delivery delay is zero.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#DEFAULT_DELIVERY_MODE">DEFAULT_DELIVERY_MODE</a></span></code>
<div class="block">The message producer's default delivery mode is <code>PERSISTENT</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#DEFAULT_PRIORITY">DEFAULT_PRIORITY</a></span></code>
<div class="block">The message producer's default priority is 4.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#DEFAULT_TIME_TO_LIVE">DEFAULT_TIME_TO_LIVE</a></span></code>
<div class="block">The message producer's default time to live is unlimited; the message never expires.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#acknowledge--">acknowledge</a></span>()</code>
<div class="block">Acknowledges all consumed messages of the session of this consumed message.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#clearBody--">clearBody</a></span>()</code>
<div class="block">Clears out the message body.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#clearProperties--">clearProperties</a></span>()</code>
<div class="block">Clears a message's properties.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;T</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#getBody-java.lang.Class-">getBody</a></span>(java.lang.Class&lt;T&gt;&nbsp;c)</code>
<div class="block">Returns the message body as an object of the specified type.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#getBooleanProperty-java.lang.String-">getBooleanProperty</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Returns the value of the <code>boolean</code> property with the specified name.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>byte</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#getByteProperty-java.lang.String-">getByteProperty</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Returns the value of the <code>byte</code> property with the specified name.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#getDoubleProperty-java.lang.String-">getDoubleProperty</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Returns the value of the <code>double</code> property with the specified name.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#getFloatProperty-java.lang.String-">getFloatProperty</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Returns the value of the <code>float</code> property with the specified name.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#getIntProperty-java.lang.String-">getIntProperty</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Returns the value of the <code>int</code> property with the specified name.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#getJMSCorrelationID--">getJMSCorrelationID</a></span>()</code>
<div class="block">Gets the correlation ID for the message.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#getJMSCorrelationIDAsBytes--">getJMSCorrelationIDAsBytes</a></span>()</code>
<div class="block">Gets the correlation ID as an array of bytes for the message.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#getJMSDeliveryMode--">getJMSDeliveryMode</a></span>()</code>
<div class="block">Gets the <code>DeliveryMode</code> value specified for this message.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#getJMSDeliveryTime--">getJMSDeliveryTime</a></span>()</code>
<div class="block">Gets the message's delivery time value.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="../../jakarta/jms/Destination.html" title="interface in jakarta.jms">Destination</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#getJMSDestination--">getJMSDestination</a></span>()</code>
<div class="block">Gets the <code>Destination</code> object for this message.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#getJMSExpiration--">getJMSExpiration</a></span>()</code>
<div class="block">Gets the message's expiration time.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#getJMSMessageID--">getJMSMessageID</a></span>()</code>
<div class="block">Gets the message ID.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#getJMSPriority--">getJMSPriority</a></span>()</code>
<div class="block">Gets the message priority level.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#getJMSRedelivered--">getJMSRedelivered</a></span>()</code>
<div class="block">Gets an indication of whether this message is being redelivered.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code><a href="../../jakarta/jms/Destination.html" title="interface in jakarta.jms">Destination</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#getJMSReplyTo--">getJMSReplyTo</a></span>()</code>
<div class="block">Gets the <code>Destination</code> object to which a reply to this message should be sent.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#getJMSTimestamp--">getJMSTimestamp</a></span>()</code>
<div class="block">Gets the message timestamp.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#getJMSType--">getJMSType</a></span>()</code>
<div class="block">Gets the message type identifier supplied by the client when the message was sent.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#getLongProperty-java.lang.String-">getLongProperty</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Returns the value of the <code>long</code> property with the specified name.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#getObjectProperty-java.lang.String-">getObjectProperty</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Returns the value of the Java object property with the specified name.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>java.util.Enumeration</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#getPropertyNames--">getPropertyNames</a></span>()</code>
<div class="block">Returns an <code>Enumeration</code> of all the property names.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>short</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#getShortProperty-java.lang.String-">getShortProperty</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Returns the value of the <code>short</code> property with the specified name.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#getStringProperty-java.lang.String-">getStringProperty</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Returns the value of the <code>String</code> property with the specified name.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#isBodyAssignableTo-java.lang.Class-">isBodyAssignableTo</a></span>(java.lang.Class&nbsp;c)</code>
<div class="block">Returns whether the message body is capable of being assigned to the specified type.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#propertyExists-java.lang.String-">propertyExists</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Indicates whether a property value exists.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#setBooleanProperty-java.lang.String-boolean-">setBooleanProperty</a></span>(java.lang.String&nbsp;name,
boolean&nbsp;value)</code>
<div class="block">Sets a <code>boolean</code> property value with the specified name into the message.</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#setByteProperty-java.lang.String-byte-">setByteProperty</a></span>(java.lang.String&nbsp;name,
byte&nbsp;value)</code>
<div class="block">Sets a <code>byte</code> property value with the specified name into the message.</div>
</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#setDoubleProperty-java.lang.String-double-">setDoubleProperty</a></span>(java.lang.String&nbsp;name,
double&nbsp;value)</code>
<div class="block">Sets a <code>double</code> property value with the specified name into the message.</div>
</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#setFloatProperty-java.lang.String-float-">setFloatProperty</a></span>(java.lang.String&nbsp;name,
float&nbsp;value)</code>
<div class="block">Sets a <code>float</code> property value with the specified name into the message.</div>
</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#setIntProperty-java.lang.String-int-">setIntProperty</a></span>(java.lang.String&nbsp;name,
int&nbsp;value)</code>
<div class="block">Sets an <code>int</code> property value with the specified name into the message.</div>
</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#setJMSCorrelationID-java.lang.String-">setJMSCorrelationID</a></span>(java.lang.String&nbsp;correlationID)</code>
<div class="block">Sets the correlation ID for the message.</div>
</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#setJMSCorrelationIDAsBytes-byte:A-">setJMSCorrelationIDAsBytes</a></span>(byte[]&nbsp;correlationID)</code>
<div class="block">Sets the correlation ID as an array of bytes for the message.</div>
</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#setJMSDeliveryMode-int-">setJMSDeliveryMode</a></span>(int&nbsp;deliveryMode)</code>
<div class="block">Sets the <code>DeliveryMode</code> value for this message.</div>
</td>
</tr>
<tr id="i36" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#setJMSDeliveryTime-long-">setJMSDeliveryTime</a></span>(long&nbsp;deliveryTime)</code>
<div class="block">Sets the message's delivery time value.</div>
</td>
</tr>
<tr id="i37" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#setJMSDestination-jakarta.jms.Destination-">setJMSDestination</a></span>(<a href="../../jakarta/jms/Destination.html" title="interface in jakarta.jms">Destination</a>&nbsp;destination)</code>
<div class="block">Sets the <code>Destination</code> object for this message.</div>
</td>
</tr>
<tr id="i38" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#setJMSExpiration-long-">setJMSExpiration</a></span>(long&nbsp;expiration)</code>
<div class="block">Sets the message's expiration value.</div>
</td>
</tr>
<tr id="i39" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#setJMSMessageID-java.lang.String-">setJMSMessageID</a></span>(java.lang.String&nbsp;id)</code>
<div class="block">Sets the message ID.</div>
</td>
</tr>
<tr id="i40" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#setJMSPriority-int-">setJMSPriority</a></span>(int&nbsp;priority)</code>
<div class="block">Sets the priority level for this message.</div>
</td>
</tr>
<tr id="i41" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#setJMSRedelivered-boolean-">setJMSRedelivered</a></span>(boolean&nbsp;redelivered)</code>
<div class="block">Specifies whether this message is being redelivered.</div>
</td>
</tr>
<tr id="i42" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#setJMSReplyTo-jakarta.jms.Destination-">setJMSReplyTo</a></span>(<a href="../../jakarta/jms/Destination.html" title="interface in jakarta.jms">Destination</a>&nbsp;replyTo)</code>
<div class="block">Sets the <code>Destination</code> object to which a reply to this message should be sent.</div>
</td>
</tr>
<tr id="i43" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#setJMSTimestamp-long-">setJMSTimestamp</a></span>(long&nbsp;timestamp)</code>
<div class="block">Sets the message timestamp.</div>
</td>
</tr>
<tr id="i44" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#setJMSType-java.lang.String-">setJMSType</a></span>(java.lang.String&nbsp;type)</code>
<div class="block">Sets the message type.</div>
</td>
</tr>
<tr id="i45" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#setLongProperty-java.lang.String-long-">setLongProperty</a></span>(java.lang.String&nbsp;name,
long&nbsp;value)</code>
<div class="block">Sets a <code>long</code> property value with the specified name into the message.</div>
</td>
</tr>
<tr id="i46" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#setObjectProperty-java.lang.String-java.lang.Object-">setObjectProperty</a></span>(java.lang.String&nbsp;name,
java.lang.Object&nbsp;value)</code>
<div class="block">Sets a Java object property value with the specified name into the message.</div>
</td>
</tr>
<tr id="i47" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#setShortProperty-java.lang.String-short-">setShortProperty</a></span>(java.lang.String&nbsp;name,
short&nbsp;value)</code>
<div class="block">Sets a <code>short</code> property value with the specified name into the message.</div>
</td>
</tr>
<tr id="i48" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/Message.html#setStringProperty-java.lang.String-java.lang.String-">setStringProperty</a></span>(java.lang.String&nbsp;name,
java.lang.String&nbsp;value)</code>
<div class="block">Sets a <code>String</code> property value with the specified name into the message.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="DEFAULT_DELIVERY_MODE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_DELIVERY_MODE</h4>
<pre>static final&nbsp;int DEFAULT_DELIVERY_MODE</pre>
<div class="block">The message producer's default delivery mode is <code>PERSISTENT</code>.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/DeliveryMode.html#PERSISTENT"><code>DeliveryMode.PERSISTENT</code></a>,
<a href="../../constant-values.html#jakarta.jms.Message.DEFAULT_DELIVERY_MODE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_PRIORITY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_PRIORITY</h4>
<pre>static final&nbsp;int DEFAULT_PRIORITY</pre>
<div class="block">The message producer's default priority is 4.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../constant-values.html#jakarta.jms.Message.DEFAULT_PRIORITY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_TIME_TO_LIVE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_TIME_TO_LIVE</h4>
<pre>static final&nbsp;long DEFAULT_TIME_TO_LIVE</pre>
<div class="block">The message producer's default time to live is unlimited; the message never expires.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../constant-values.html#jakarta.jms.Message.DEFAULT_TIME_TO_LIVE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_DELIVERY_DELAY">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DEFAULT_DELIVERY_DELAY</h4>
<pre>static final&nbsp;long DEFAULT_DELIVERY_DELAY</pre>
<div class="block">The message producer's default delivery delay is zero.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JMS 2.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../constant-values.html#jakarta.jms.Message.DEFAULT_DELIVERY_DELAY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getJMSMessageID--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getJMSMessageID</h4>
<pre>java.lang.String&nbsp;getJMSMessageID()
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Gets the message ID.
<p>
The <code>JMSMessageID</code> header field contains a value that uniquely identifies each message sent by a provider.
<p>
When a message is sent, <code>JMSMessageID</code> can be ignored. When the <code>send</code> or <code>publish</code> method returns,
it contains a provider-assigned value.
<p>
A <code>JMSMessageID</code> is a <code>String</code> value that should function as a unique key for identifying messages in a
historical repository. The exact scope of uniqueness is provider-defined. It should at least cover all messages for a
specific installation of a provider, where an installation is some connected set of message routers.
<p>
All <code>JMSMessageID</code> values must start with the prefix <code>'ID:'</code>. Uniqueness of message ID values across
different providers is not required.
<p>
Since message IDs take some effort to create and increase a message's size, some Jakarta Messaging providers may be able to
optimize message overhead if they are given a hint that the message ID is not used by an application. By calling the
<code>MessageProducer.setDisableMessageID</code> method, a Jakarta Messaging client enables this potential optimization for all messages
sent by that message producer. If the Jakarta Messaging provider accepts this hint, these messages must have the message ID set to
null; if the provider ignores the hint, the message ID must be set to its normal unique value.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the message ID</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to get the message ID due to some internal error.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/Message.html#setJMSMessageID-java.lang.String-"><code>setJMSMessageID(String)</code></a>,
<a href="../../jakarta/jms/MessageProducer.html#setDisableMessageID-boolean-"><code>MessageProducer.setDisableMessageID(boolean)</code></a></dd>
</dl>
</li>
</ul>
<a name="setJMSMessageID-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setJMSMessageID</h4>
<pre>void&nbsp;setJMSMessageID(java.lang.String&nbsp;id)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Sets the message ID.
<p>
This method is for use by Jakarta Messaging providers only to set this field when a message is sent. This message cannot be used by
clients to configure the message ID. This method is public to allow a Jakarta Messaging provider to set this field when sending a
message whose implementation is not its own.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>id</code> - the ID of the message</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to set the message ID due to some internal error.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/Message.html#getJMSMessageID--"><code>getJMSMessageID()</code></a></dd>
</dl>
</li>
</ul>
<a name="getJMSTimestamp--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getJMSTimestamp</h4>
<pre>long&nbsp;getJMSTimestamp()
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Gets the message timestamp.
<p>
The <code>JMSTimestamp</code> header field contains the time a message was handed off to a provider to be sent. It is not
the time the message was actually transmitted, because the actual send may occur later due to transactions or other
client-side queueing of messages.
<p>
When a message is sent, <code>JMSTimestamp</code> is ignored. When the <code>send</code> or <code>publish</code> method returns, it
contains a time value somewhere in the interval between the call and the return. The value is in the format of a
normal millis time value in the Java programming language.
<p>
Since timestamps take some effort to create and increase a message's size, some Jakarta Messaging providers may be able to optimize
message overhead if they are given a hint that the timestamp is not used by an application. By calling the
<code>MessageProducer.setDisableMessageTimestamp</code> method, a Jakarta Messaging client enables this potential optimization for all
messages sent by that message producer. If the Jakarta Messaging provider accepts this hint, these messages must have the timestamp
set to zero; if the provider ignores the hint, the timestamp must be set to its normal value.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the message timestamp</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to get the timestamp due to some internal error.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/Message.html#setJMSTimestamp-long-"><code>setJMSTimestamp(long)</code></a>,
<a href="../../jakarta/jms/MessageProducer.html#setDisableMessageTimestamp-boolean-"><code>MessageProducer.setDisableMessageTimestamp(boolean)</code></a></dd>
</dl>
</li>
</ul>
<a name="setJMSTimestamp-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setJMSTimestamp</h4>
<pre>void&nbsp;setJMSTimestamp(long&nbsp;timestamp)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Sets the message timestamp.
<p>
This method is for use by Jakarta Messaging providers only to set this field when a message is sent. This message cannot be used by
clients to configure the message timestamp. This method is public to allow a Jakarta Messaging provider to set this field when
sending a message whose implementation is not its own.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>timestamp</code> - the timestamp for this message</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to set the timestamp due to some internal error.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/Message.html#getJMSTimestamp--"><code>getJMSTimestamp()</code></a></dd>
</dl>
</li>
</ul>
<a name="getJMSCorrelationIDAsBytes--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getJMSCorrelationIDAsBytes</h4>
<pre>byte[]&nbsp;getJMSCorrelationIDAsBytes()
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Gets the correlation ID as an array of bytes for the message.
<p>
The use of a <code>byte[]</code> value for <code>JMSCorrelationID</code> is non-portable.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the correlation ID of a message as an array of bytes</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to get the correlation ID due to some internal error.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/Message.html#setJMSCorrelationID-java.lang.String-"><code>setJMSCorrelationID(String)</code></a>,
<a href="../../jakarta/jms/Message.html#getJMSCorrelationID--"><code>getJMSCorrelationID()</code></a>,
<a href="../../jakarta/jms/Message.html#setJMSCorrelationIDAsBytes-byte:A-"><code>setJMSCorrelationIDAsBytes(byte[])</code></a></dd>
</dl>
</li>
</ul>
<a name="setJMSCorrelationIDAsBytes-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setJMSCorrelationIDAsBytes</h4>
<pre>void&nbsp;setJMSCorrelationIDAsBytes(byte[]&nbsp;correlationID)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Sets the correlation ID as an array of bytes for the message.
<p>
The array is copied before the method returns, so future modifications to the array will not alter this message
header.
<p>
If a provider supports the native concept of correlation ID, a Jakarta Messaging client may need to assign specific
<code>JMSCorrelationID</code> values to match those expected by native messaging clients. Jakarta Messaging providers without native
correlation ID values are not required to support this method and its corresponding get method; their implementation
may throw a <code>java.lang.UnsupportedOperationException</code>.
<p>
The use of a <code>byte[]</code> value for <code>JMSCorrelationID</code> is non-portable.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>correlationID</code> - the correlation ID value as an array of bytes</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to set the correlation ID due to some internal error.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/Message.html#setJMSCorrelationID-java.lang.String-"><code>setJMSCorrelationID(String)</code></a>,
<a href="../../jakarta/jms/Message.html#getJMSCorrelationID--"><code>getJMSCorrelationID()</code></a>,
<a href="../../jakarta/jms/Message.html#getJMSCorrelationIDAsBytes--"><code>getJMSCorrelationIDAsBytes()</code></a></dd>
</dl>
</li>
</ul>
<a name="setJMSCorrelationID-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setJMSCorrelationID</h4>
<pre>void&nbsp;setJMSCorrelationID(java.lang.String&nbsp;correlationID)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Sets the correlation ID for the message.
<p>
A client can use the <code>JMSCorrelationID</code> header field to link one message with another. A typical use is to link
a response message with its request message.
<p>
<code>JMSCorrelationID</code> can hold one of the following:
<ul>
<li>A provider-specific message ID
<li>An application-specific <code>String</code>
<li>A provider-native <code>byte[]</code> value
</ul>
<p>
Since each message sent by a Jakarta Messaging provider is assigned a message ID value, it is convenient to link messages via
message ID. All message ID values must start with the <code>'ID:'</code> prefix.
<p>
In some cases, an application (made up of several clients) needs to use an application-specific value for linking
messages. For instance, an application may use <code>JMSCorrelationID</code> to hold a value referencing some external
information. Application-specified values must not start with the <code>'ID:'</code> prefix; this is reserved for
provider-generated message ID values.
<p>
If a provider supports the native concept of correlation ID, a Jakarta Messaging client may need to assign specific
<code>JMSCorrelationID</code> values to match those expected by clients that do not use the Jakarta Messaging API. A <code>byte[]</code>
value is used for this purpose. Jakarta Messaging providers without native correlation ID values are not required to support
<code>byte[]</code> values. The use of a <code>byte[]</code> value for <code>JMSCorrelationID</code> is non-portable.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>correlationID</code> - the message ID of a message being referred to</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to set the correlation ID due to some internal error.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/Message.html#getJMSCorrelationID--"><code>getJMSCorrelationID()</code></a>,
<a href="../../jakarta/jms/Message.html#getJMSCorrelationIDAsBytes--"><code>getJMSCorrelationIDAsBytes()</code></a>,
<a href="../../jakarta/jms/Message.html#setJMSCorrelationIDAsBytes-byte:A-"><code>setJMSCorrelationIDAsBytes(byte[])</code></a></dd>
</dl>
</li>
</ul>
<a name="getJMSCorrelationID--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getJMSCorrelationID</h4>
<pre>java.lang.String&nbsp;getJMSCorrelationID()
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Gets the correlation ID for the message.
<p>
This method is used to return correlation ID values that are either provider-specific message IDs or
application-specific <code>String</code> values.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the correlation ID of a message as a <code>String</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to get the correlation ID due to some internal error.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/Message.html#setJMSCorrelationID-java.lang.String-"><code>setJMSCorrelationID(String)</code></a>,
<a href="../../jakarta/jms/Message.html#getJMSCorrelationIDAsBytes--"><code>getJMSCorrelationIDAsBytes()</code></a>,
<a href="../../jakarta/jms/Message.html#setJMSCorrelationIDAsBytes-byte:A-"><code>setJMSCorrelationIDAsBytes(byte[])</code></a></dd>
</dl>
</li>
</ul>
<a name="getJMSReplyTo--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getJMSReplyTo</h4>
<pre><a href="../../jakarta/jms/Destination.html" title="interface in jakarta.jms">Destination</a>&nbsp;getJMSReplyTo()
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Gets the <code>Destination</code> object to which a reply to this message should be sent.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>Destination</code> to which to send a response to this message</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to get the <code>JMSReplyTo</code> destination due to some internal
error.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/Message.html#setJMSReplyTo-jakarta.jms.Destination-"><code>setJMSReplyTo(Destination)</code></a></dd>
</dl>
</li>
</ul>
<a name="setJMSReplyTo-jakarta.jms.Destination-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setJMSReplyTo</h4>
<pre>void&nbsp;setJMSReplyTo(<a href="../../jakarta/jms/Destination.html" title="interface in jakarta.jms">Destination</a>&nbsp;replyTo)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Sets the <code>Destination</code> object to which a reply to this message should be sent.
<p>
The <code>JMSReplyTo</code> header field contains the destination where a reply to the current message should be sent. If
it is null, no reply is expected. The destination may be either a <code>Queue</code> object or a <code>Topic</code> object.
<p>
Messages sent with a null <code>JMSReplyTo</code> value may be a notification of some event, or they may just be some data
the sender thinks is of interest.
<p>
Messages with a <code>JMSReplyTo</code> value typically expect a response. A response is optional; it is up to the client
to decide. These messages are called requests. A message sent in response to a request is called a reply.
<p>
In some cases a client may wish to match a request it sent earlier with a reply it has just received. The client can
use the <code>JMSCorrelationID</code> header field for this purpose.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>replyTo</code> - <code>Destination</code> to which to send a response to this message</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to set the <code>JMSReplyTo</code> destination due to some internal
error.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/Message.html#getJMSReplyTo--"><code>getJMSReplyTo()</code></a></dd>
</dl>
</li>
</ul>
<a name="getJMSDestination--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getJMSDestination</h4>
<pre><a href="../../jakarta/jms/Destination.html" title="interface in jakarta.jms">Destination</a>&nbsp;getJMSDestination()
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Gets the <code>Destination</code> object for this message.
<p>
The <code>JMSDestination</code> header field contains the destination to which the message is being sent.
<p>
When a message is sent, this field is ignored. After completion of the <code>send</code> or <code>publish</code> method, the
field holds the destination specified by the method.
<p>
When a message is received, its <code>JMSDestination</code> value must be equivalent to the value assigned when it was
sent.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the destination of this message</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to get the destination due to some internal error.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/Message.html#setJMSDestination-jakarta.jms.Destination-"><code>setJMSDestination(Destination)</code></a></dd>
</dl>
</li>
</ul>
<a name="setJMSDestination-jakarta.jms.Destination-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setJMSDestination</h4>
<pre>void&nbsp;setJMSDestination(<a href="../../jakarta/jms/Destination.html" title="interface in jakarta.jms">Destination</a>&nbsp;destination)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Sets the <code>Destination</code> object for this message.
<p>
This method is for use by Jakarta Messaging providers only to set this field when a message is sent. This message cannot be used by
clients to configure the destination of the message. This method is public to allow a Jakarta Messaging provider to set this field
when sending a message whose implementation is not its own.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>destination</code> - the destination for this message</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to set the destination due to some internal error.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/Message.html#getJMSDestination--"><code>getJMSDestination()</code></a></dd>
</dl>
</li>
</ul>
<a name="getJMSDeliveryMode--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getJMSDeliveryMode</h4>
<pre>int&nbsp;getJMSDeliveryMode()
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Gets the <code>DeliveryMode</code> value specified for this message.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the delivery mode for this message</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to get the delivery mode due to some internal error.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/Message.html#setJMSDeliveryMode-int-"><code>setJMSDeliveryMode(int)</code></a>,
<a href="../../jakarta/jms/DeliveryMode.html" title="interface in jakarta.jms"><code>DeliveryMode</code></a></dd>
</dl>
</li>
</ul>
<a name="setJMSDeliveryMode-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setJMSDeliveryMode</h4>
<pre>void&nbsp;setJMSDeliveryMode(int&nbsp;deliveryMode)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Sets the <code>DeliveryMode</code> value for this message.
<p>
This method is for use by Jakarta Messaging providers only to set this field when a message is sent. This message cannot be used by
clients to configure the delivery mode of the message. This method is public to allow a Jakarta Messaging provider to set this
field when sending a message whose implementation is not its own.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>deliveryMode</code> - the delivery mode for this message</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to set the delivery mode due to some internal error.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/Message.html#getJMSDeliveryMode--"><code>getJMSDeliveryMode()</code></a>,
<a href="../../jakarta/jms/DeliveryMode.html" title="interface in jakarta.jms"><code>DeliveryMode</code></a></dd>
</dl>
</li>
</ul>
<a name="getJMSRedelivered--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getJMSRedelivered</h4>
<pre>boolean&nbsp;getJMSRedelivered()
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Gets an indication of whether this message is being redelivered.
<p>
If a client receives a message with the <code>JMSRedelivered</code> field set, it is likely, but not guaranteed, that this
message was delivered earlier but that its receipt was not acknowledged at that time.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if this message is being redelivered</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to get the redelivered state due to some internal error.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/Message.html#setJMSRedelivered-boolean-"><code>setJMSRedelivered(boolean)</code></a></dd>
</dl>
</li>
</ul>
<a name="setJMSRedelivered-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setJMSRedelivered</h4>
<pre>void&nbsp;setJMSRedelivered(boolean&nbsp;redelivered)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Specifies whether this message is being redelivered.
<p>
This method is for use by Jakarta Messaging providers only to set this field when a message is delivered. This message cannot be
used by clients to configure the redelivered status of the message. This method is public to allow a Jakarta Messaging provider to
set this field when sending a message whose implementation is not its own.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>redelivered</code> - an indication of whether this message is being redelivered</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to set the redelivered state due to some internal error.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/Message.html#getJMSRedelivered--"><code>getJMSRedelivered()</code></a></dd>
</dl>
</li>
</ul>
<a name="getJMSType--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getJMSType</h4>
<pre>java.lang.String&nbsp;getJMSType()
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Gets the message type identifier supplied by the client when the message was sent.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the message type</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to get the message type due to some internal error.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/Message.html#setJMSType-java.lang.String-"><code>setJMSType(String)</code></a></dd>
</dl>
</li>
</ul>
<a name="setJMSType-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setJMSType</h4>
<pre>void&nbsp;setJMSType(java.lang.String&nbsp;type)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Sets the message type.
<p>
Some Jakarta Messaging providers use a message repository that contains the definitions of messages sent by applications. The
<code>JMSType</code> header field may reference a message's definition in the provider's repository.
<p>
The Jakarta Messaging API does not define a standard message definition repository, nor does it define a naming policy for the
definitions it contains.
<p>
Some messaging systems require that a message type definition for each application message be created and that each
message specify its type. In order to work with such Jakarta Messaging providers, Jakarta Messaging clients should assign a value to
<code>JMSType</code>, whether the application makes use of it or not. This ensures that the field is properly set for
those providers that require it.
<p>
To ensure portability, Jakarta Messaging clients should use symbolic values for <code>JMSType</code> that can be configured at
installation time to the values defined in the current provider's message repository. If string literals are used,
they may not be valid type names for some Jakarta Messaging providers.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - the message type</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to set the message type due to some internal error.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/Message.html#getJMSType--"><code>getJMSType()</code></a></dd>
</dl>
</li>
</ul>
<a name="getJMSExpiration--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getJMSExpiration</h4>
<pre>long&nbsp;getJMSExpiration()
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Gets the message's expiration time.
<p>
When a message is sent, the <code>JMSExpiration</code> header field is left unassigned. After completion of the
<code>send</code> or <code>publish</code> method, it holds the expiration time of the message. This is the the difference,
measured in milliseconds, between the expiration time and midnight, January 1, 1970 UTC.
<p>
If the time-to-live is specified as zero, <code>JMSExpiration</code> is set to zero to indicate that the message does not
expire.
<p>
When a message's expiration time is reached, a provider should discard it. The Jakarta Messaging API does not define any form of
notification of message expiration.
<p>
Clients should not receive messages that have expired; however, the Jakarta Messaging API does not guarantee that this will not
happen.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the message's expiration time value</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to get the message expiration due to some internal error.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/Message.html#setJMSExpiration-long-"><code>setJMSExpiration(long)</code></a></dd>
</dl>
</li>
</ul>
<a name="setJMSExpiration-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setJMSExpiration</h4>
<pre>void&nbsp;setJMSExpiration(long&nbsp;expiration)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Sets the message's expiration value.
<p>
This method is for use by Jakarta Messaging providers only to set this field when a message is sent. This message cannot be used by
clients to configure the expiration time of the message. This method is public to allow a Jakarta Messaging provider to set this
field when sending a message whose implementation is not its own.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>expiration</code> - the message's expiration time</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to set the message expiration due to some internal error.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/Message.html#getJMSExpiration--"><code>getJMSExpiration()</code></a></dd>
</dl>
</li>
</ul>
<a name="getJMSDeliveryTime--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getJMSDeliveryTime</h4>
<pre>long&nbsp;getJMSDeliveryTime()
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Gets the message's delivery time value.
<p>
When a message is sent, the <code>JMSDeliveryTime</code> header field is left unassigned. After completion of the
<code>send</code> or <code>publish</code> method, it holds the delivery time of the message. This is the the difference,
measured in milliseconds, between the delivery time and midnight, January 1, 1970 UTC.
<p>
A message's delivery time is the earliest time when a Jakarta Messaging provider may deliver the message to a consumer. The
provider must not deliver messages before the delivery time has been reached.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the message's delivery time value</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to get the delivery time due to some internal error.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JMS 2.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/Message.html#setJMSDeliveryTime-long-"><code>setJMSDeliveryTime(long)</code></a></dd>
</dl>
</li>
</ul>
<a name="setJMSDeliveryTime-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setJMSDeliveryTime</h4>
<pre>void&nbsp;setJMSDeliveryTime(long&nbsp;deliveryTime)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Sets the message's delivery time value.
<p>
This method is for use by Jakarta Messaging providers only to set this field when a message is sent. This message cannot be used by
clients to configure the delivery time of the message. This method is public to allow a Jakarta Messaging provider to set this
field when sending a message whose implementation is not its own.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>deliveryTime</code> - the message's delivery time value</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to set the delivery time due to some internal error.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JMS 2.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/Message.html#getJMSDeliveryTime--"><code>getJMSDeliveryTime()</code></a></dd>
</dl>
</li>
</ul>
<a name="getJMSPriority--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getJMSPriority</h4>
<pre>int&nbsp;getJMSPriority()
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Gets the message priority level.
<p>
The Jakarta Messaging API defines ten levels of priority value, with 0 as the lowest priority and 9 as the highest. In addition,
clients should consider priorities 0-4 as gradations of normal priority and priorities 5-9 as gradations of expedited
priority.
<p>
The Jakarta Messaging API does not require that a provider strictly implement priority ordering of messages; however, it should do
its best to deliver expedited messages ahead of normal messages.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the default message priority</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to get the message priority due to some internal error.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/Message.html#setJMSPriority-int-"><code>setJMSPriority(int)</code></a></dd>
</dl>
</li>
</ul>
<a name="setJMSPriority-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setJMSPriority</h4>
<pre>void&nbsp;setJMSPriority(int&nbsp;priority)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Sets the priority level for this message.
<p>
This method is for use by Jakarta Messaging providers only to set this field when a message is sent. This message cannot be used by
clients to configure the priority level of the message. This method is public to allow a Jakarta Messaging provider to set this
field when sending a message whose implementation is not its own.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>priority</code> - the priority of this message</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to set the message priority due to some internal error.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/Message.html#getJMSPriority--"><code>getJMSPriority()</code></a></dd>
</dl>
</li>
</ul>
<a name="clearProperties--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clearProperties</h4>
<pre>void&nbsp;clearProperties()
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Clears a message's properties.
<p>
The message's header fields and body are not cleared.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to clear the message properties due to some internal error.</dd>
</dl>
</li>
</ul>
<a name="propertyExists-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>propertyExists</h4>
<pre>boolean&nbsp;propertyExists(java.lang.String&nbsp;name)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Indicates whether a property value exists.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the property to test</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the property exists</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to determine if the property exists due to some internal error.</dd>
</dl>
</li>
</ul>
<a name="getBooleanProperty-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBooleanProperty</h4>
<pre>boolean&nbsp;getBooleanProperty(java.lang.String&nbsp;name)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Returns the value of the <code>boolean</code> property with the specified name.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the <code>boolean</code> property</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <code>boolean</code> property value for the specified name</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to get the property value due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageFormatException.html" title="class in jakarta.jms">MessageFormatException</a></code> - if this type conversion is invalid.</dd>
</dl>
</li>
</ul>
<a name="getByteProperty-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getByteProperty</h4>
<pre>byte&nbsp;getByteProperty(java.lang.String&nbsp;name)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Returns the value of the <code>byte</code> property with the specified name.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the <code>byte</code> property</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <code>byte</code> property value for the specified name</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to get the property value due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageFormatException.html" title="class in jakarta.jms">MessageFormatException</a></code> - if this type conversion is invalid.</dd>
</dl>
</li>
</ul>
<a name="getShortProperty-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getShortProperty</h4>
<pre>short&nbsp;getShortProperty(java.lang.String&nbsp;name)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Returns the value of the <code>short</code> property with the specified name.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the <code>short</code> property</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <code>short</code> property value for the specified name</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to get the property value due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageFormatException.html" title="class in jakarta.jms">MessageFormatException</a></code> - if this type conversion is invalid.</dd>
</dl>
</li>
</ul>
<a name="getIntProperty-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIntProperty</h4>
<pre>int&nbsp;getIntProperty(java.lang.String&nbsp;name)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Returns the value of the <code>int</code> property with the specified name.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the <code>int</code> property</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <code>int</code> property value for the specified name</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to get the property value due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageFormatException.html" title="class in jakarta.jms">MessageFormatException</a></code> - if this type conversion is invalid.</dd>
</dl>
</li>
</ul>
<a name="getLongProperty-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLongProperty</h4>
<pre>long&nbsp;getLongProperty(java.lang.String&nbsp;name)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Returns the value of the <code>long</code> property with the specified name.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the <code>long</code> property</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <code>long</code> property value for the specified name</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to get the property value due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageFormatException.html" title="class in jakarta.jms">MessageFormatException</a></code> - if this type conversion is invalid.</dd>
</dl>
</li>
</ul>
<a name="getFloatProperty-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFloatProperty</h4>
<pre>float&nbsp;getFloatProperty(java.lang.String&nbsp;name)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Returns the value of the <code>float</code> property with the specified name.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the <code>float</code> property</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <code>float</code> property value for the specified name</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to get the property value due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageFormatException.html" title="class in jakarta.jms">MessageFormatException</a></code> - if this type conversion is invalid.</dd>
</dl>
</li>
</ul>
<a name="getDoubleProperty-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDoubleProperty</h4>
<pre>double&nbsp;getDoubleProperty(java.lang.String&nbsp;name)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Returns the value of the <code>double</code> property with the specified name.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the <code>double</code> property</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <code>double</code> property value for the specified name</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to get the property value due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageFormatException.html" title="class in jakarta.jms">MessageFormatException</a></code> - if this type conversion is invalid.</dd>
</dl>
</li>
</ul>
<a name="getStringProperty-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStringProperty</h4>
<pre>java.lang.String&nbsp;getStringProperty(java.lang.String&nbsp;name)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Returns the value of the <code>String</code> property with the specified name.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the <code>String</code> property</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <code>String</code> property value for the specified name; if there is no property by this name, a null value
is returned</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to get the property value due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageFormatException.html" title="class in jakarta.jms">MessageFormatException</a></code> - if this type conversion is invalid.</dd>
</dl>
</li>
</ul>
<a name="getObjectProperty-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getObjectProperty</h4>
<pre>java.lang.Object&nbsp;getObjectProperty(java.lang.String&nbsp;name)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Returns the value of the Java object property with the specified name.
<p>
This method can be used to return, in objectified format, an object that has been stored as a property in the message
with the equivalent <code>setObjectProperty</code> method call, or its equivalent primitive
<code>set<I>type</I>Property</code> method.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the Java object property</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the Java object property value with the specified name, in objectified format (for example, if the property
was set as an <code>int</code>, an <code>Integer</code> is returned); if there is no property by this name, a null value is
returned</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to get the property value due to some internal error.</dd>
</dl>
</li>
</ul>
<a name="getPropertyNames--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPropertyNames</h4>
<pre>java.util.Enumeration&nbsp;getPropertyNames()
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Returns an <code>Enumeration</code> of all the property names.
<p>
Note that Jakarta Messaging standard header fields are not considered properties and are not returned in this enumeration.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an enumeration of all the names of property values</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to get the property names due to some internal error.</dd>
</dl>
</li>
</ul>
<a name="setBooleanProperty-java.lang.String-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBooleanProperty</h4>
<pre>void&nbsp;setBooleanProperty(java.lang.String&nbsp;name,
boolean&nbsp;value)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Sets a <code>boolean</code> property value with the specified name into the message.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the <code>boolean</code> property</dd>
<dd><code>value</code> - the <code>boolean</code> property value to set</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to set the property due to some internal error.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if the name is null or if the name is an empty string.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotWriteableException.html" title="class in jakarta.jms">MessageNotWriteableException</a></code> - if properties are read-only</dd>
</dl>
</li>
</ul>
<a name="setByteProperty-java.lang.String-byte-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setByteProperty</h4>
<pre>void&nbsp;setByteProperty(java.lang.String&nbsp;name,
byte&nbsp;value)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Sets a <code>byte</code> property value with the specified name into the message.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the <code>byte</code> property</dd>
<dd><code>value</code> - the <code>byte</code> property value to set</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to set the property due to some internal error.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if the name is null or if the name is an empty string.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotWriteableException.html" title="class in jakarta.jms">MessageNotWriteableException</a></code> - if properties are read-only</dd>
</dl>
</li>
</ul>
<a name="setShortProperty-java.lang.String-short-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setShortProperty</h4>
<pre>void&nbsp;setShortProperty(java.lang.String&nbsp;name,
short&nbsp;value)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Sets a <code>short</code> property value with the specified name into the message.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the <code>short</code> property</dd>
<dd><code>value</code> - the <code>short</code> property value to set</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to set the property due to some internal error.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if the name is null or if the name is an empty string.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotWriteableException.html" title="class in jakarta.jms">MessageNotWriteableException</a></code> - if properties are read-only</dd>
</dl>
</li>
</ul>
<a name="setIntProperty-java.lang.String-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setIntProperty</h4>
<pre>void&nbsp;setIntProperty(java.lang.String&nbsp;name,
int&nbsp;value)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Sets an <code>int</code> property value with the specified name into the message.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the <code>int</code> property</dd>
<dd><code>value</code> - the <code>int</code> property value to set</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to set the property due to some internal error.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if the name is null or if the name is an empty string.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotWriteableException.html" title="class in jakarta.jms">MessageNotWriteableException</a></code> - if properties are read-only</dd>
</dl>
</li>
</ul>
<a name="setLongProperty-java.lang.String-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setLongProperty</h4>
<pre>void&nbsp;setLongProperty(java.lang.String&nbsp;name,
long&nbsp;value)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Sets a <code>long</code> property value with the specified name into the message.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the <code>long</code> property</dd>
<dd><code>value</code> - the <code>long</code> property value to set</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to set the property due to some internal error.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if the name is null or if the name is an empty string.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotWriteableException.html" title="class in jakarta.jms">MessageNotWriteableException</a></code> - if properties are read-only</dd>
</dl>
</li>
</ul>
<a name="setFloatProperty-java.lang.String-float-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setFloatProperty</h4>
<pre>void&nbsp;setFloatProperty(java.lang.String&nbsp;name,
float&nbsp;value)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Sets a <code>float</code> property value with the specified name into the message.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the <code>float</code> property</dd>
<dd><code>value</code> - the <code>float</code> property value to set</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to set the property due to some internal error.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if the name is null or if the name is an empty string.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotWriteableException.html" title="class in jakarta.jms">MessageNotWriteableException</a></code> - if properties are read-only</dd>
</dl>
</li>
</ul>
<a name="setDoubleProperty-java.lang.String-double-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDoubleProperty</h4>
<pre>void&nbsp;setDoubleProperty(java.lang.String&nbsp;name,
double&nbsp;value)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Sets a <code>double</code> property value with the specified name into the message.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the <code>double</code> property</dd>
<dd><code>value</code> - the <code>double</code> property value to set</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to set the property due to some internal error.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if the name is null or if the name is an empty string.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotWriteableException.html" title="class in jakarta.jms">MessageNotWriteableException</a></code> - if properties are read-only</dd>
</dl>
</li>
</ul>
<a name="setStringProperty-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setStringProperty</h4>
<pre>void&nbsp;setStringProperty(java.lang.String&nbsp;name,
java.lang.String&nbsp;value)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Sets a <code>String</code> property value with the specified name into the message.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the <code>String</code> property</dd>
<dd><code>value</code> - the <code>String</code> property value to set</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to set the property due to some internal error.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if the name is null or if the name is an empty string.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotWriteableException.html" title="class in jakarta.jms">MessageNotWriteableException</a></code> - if properties are read-only</dd>
</dl>
</li>
</ul>
<a name="setObjectProperty-java.lang.String-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setObjectProperty</h4>
<pre>void&nbsp;setObjectProperty(java.lang.String&nbsp;name,
java.lang.Object&nbsp;value)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Sets a Java object property value with the specified name into the message.
<p>
Note that this method works only for the objectified primitive object types (<code>Integer</code>, <code>Double</code>,
<code>Long</code> ...) and <code>String</code> objects.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the Java object property</dd>
<dd><code>value</code> - the Java object property value to set</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to set the property due to some internal error.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if the name is null or if the name is an empty string.</dd>
<dd><code><a href="../../jakarta/jms/MessageFormatException.html" title="class in jakarta.jms">MessageFormatException</a></code> - if the object is invalid</dd>
<dd><code><a href="../../jakarta/jms/MessageNotWriteableException.html" title="class in jakarta.jms">MessageNotWriteableException</a></code> - if properties are read-only</dd>
</dl>
</li>
</ul>
<a name="acknowledge--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>acknowledge</h4>
<pre>void&nbsp;acknowledge()
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Acknowledges all consumed messages of the session of this consumed message.
<p>
All consumed Jakarta Messaging messages support the <code>acknowledge</code> method for use when a client has specified that its JMS
session's consumed messages are to be explicitly acknowledged. By invoking <code>acknowledge</code> on a consumed message,
a client acknowledges all messages consumed by the session that the message was delivered to.
<p>
Calls to <code>acknowledge</code> are ignored for both transacted sessions and sessions specified to use implicit
acknowledgement modes.
<p>
A client may individually acknowledge each message as it is consumed, or it may choose to acknowledge messages as an
application-defined group (which is done by calling acknowledge on the last received message of the group, thereby
acknowledging all messages consumed by the session.)
<p>
Messages that have been received but not acknowledged may be redelivered.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to acknowledge the messages due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/IllegalStateException.html" title="class in jakarta.jms">IllegalStateException</a></code> - if this method is called on a closed session.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/Session.html#CLIENT_ACKNOWLEDGE"><code>Session.CLIENT_ACKNOWLEDGE</code></a></dd>
</dl>
</li>
</ul>
<a name="clearBody--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clearBody</h4>
<pre>void&nbsp;clearBody()
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Clears out the message body. Clearing a message's body does not clear its header values or property entries.
<p>
If this message body was read-only, calling this method leaves the message body in the same state as an empty body in
a newly created message.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to clear the message body due to some internal error.</dd>
</dl>
</li>
</ul>
<a name="getBody-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBody</h4>
<pre>&lt;T&gt;&nbsp;T&nbsp;getBody(java.lang.Class&lt;T&gt;&nbsp;c)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Returns the message body as an object of the specified type. This method may be called on any type of message except
for <tt>StreamMessage</tt>. The message body must be capable of being assigned to the specified type. This means that
the specified class or interface must be either the same as, or a superclass or superinterface of, the class of the
message body. If the message has no body then any type may be specified and null is returned.
<p></div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - The type of the message body</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>c</code> - The type to which the message body will be assigned. <br>
If the message is a <code>TextMessage</code> then this parameter must be set to <code>String.class</code> or another type to
which a <code>String</code> is assignable. <br>
If the message is a <code>ObjectMessage</code> then parameter must must be set to <code>java.io.Serializable.class</code> or
another type to which the body is assignable. <br>
If the message is a <code>MapMessage</code> then this parameter must be set to <code>java.util.Map.class</code> (or
<code>java.lang.Object.class</code>). <br>
If the message is a <code>BytesMessage</code> then this parameter must be set to <code>byte[].class</code> (or
<code>java.lang.Object.class</code>). This method will reset the <code>BytesMessage</code> before and after use.<br>
If the message is a <code>TextMessage</code>, <code>ObjectMessage</code>, <code>MapMessage</code> or <code>BytesMessage</code> and the
message has no body, then the above does not apply and this parameter may be set to any type; the returned value will
always be null.<br>
If the message is a <code>Message</code> (but not one of its subtypes) then this parameter may be set to any type; the
returned value will always be null.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the message body</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/MessageFormatException.html" title="class in jakarta.jms">MessageFormatException</a></code> - <ul>
<li>if the message is a <code>StreamMessage</code>
<li>if the message body cannot be assigned to the specified type
<li>if the message is an <code>ObjectMessage</code> and object deserialization fails.
</ul></dd>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to get the message body due to some internal error.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JMS 2.0</dd>
</dl>
</li>
</ul>
<a name="isBodyAssignableTo-java.lang.Class-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>isBodyAssignableTo</h4>
<pre>boolean&nbsp;isBodyAssignableTo(java.lang.Class&nbsp;c)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Returns whether the message body is capable of being assigned to the specified type. If this method returns true then
a subsequent call to the method <code>getBody</code> on the same message with the same type argument would not throw a
MessageFormatException.
<p>
If the message is a <code>StreamMessage</code> then false is always returned. If the message is a <code>ObjectMessage</code>
and object deserialization fails then false is returned. If the message has no body then any type may be specified
and true is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>c</code> - The specified type <br>
If the message is a <code>TextMessage</code> then this method will only return true if this parameter is set to
<code>String.class</code> or another type to which a <code>String</code> is assignable. <br>
If the message is a <code>ObjectMessage</code> then this method will only return true if this parameter is set to
<code>java.io.Serializable.class</code> or another class to which the body is assignable. <br>
If the message is a <code>MapMessage</code> then this method will only return true if this parameter is set to
<code>java.util.Map.class</code> (or <code>java.lang.Object.class</code>). <br>
If the message is a <code>BytesMessage</code> then this this method will only return true if this parameter is set to
<code>byte[].class</code> (or <code>java.lang.Object.class</code>). <br>
If the message is a <code>TextMessage</code>, <code>ObjectMessage</code>, <code>MapMessage</code> or <code>BytesMessage</code> and the
message has no body, then the above does not apply and this method will return true irrespective of the value of this
parameter.<br>
If the message is a <code>Message</code> (but not one of its subtypes) then this method will return true irrespective of
the value of this parameter.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether the message body is capable of being assigned to the specified type</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to return a value due to some internal error.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../jakarta/jms/MapMessage.html" title="interface in jakarta.jms"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../jakarta/jms/MessageConsumer.html" title="interface in jakarta.jms"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?jakarta/jms/Message.html" target="_top">Frames</a></li>
<li><a href="Message.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>