| <!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="../../javax/jms/MapMessage.html" title="interface in javax.jms"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../javax/jms/MessageConsumer.html" title="interface in javax.jms"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../index.html?javax/jms/Message.html" target="_top">Frames</a></li> |
| <li><a href="Message.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../allclasses-noframe.html">All 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: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li>Constr | </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">javax.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="../../javax/jms/BytesMessage.html" title="interface in javax.jms">BytesMessage</a>, <a href="../../javax/jms/MapMessage.html" title="interface in javax.jms">MapMessage</a>, <a href="../../javax/jms/ObjectMessage.html" title="interface in javax.jms">ObjectMessage</a>, <a href="../../javax/jms/StreamMessage.html" title="interface in javax.jms">StreamMessage</a>, <a href="../../javax/jms/TextMessage.html" title="interface in javax.jms">TextMessage</a></dd> |
| </dl> |
| <dl> |
| <dt>All Known Implementing Classes:</dt> |
| <dd><a href="../../org/apache/openejb/resource/activemq/jms2/DelegateMessage.html" title="class in org.apache.openejb.resource.activemq.jms2">DelegateMessage</a>, <a href="../../org/apache/openejb/resource/activemq/jms2/WrappingByteMessage.html" title="class in org.apache.openejb.resource.activemq.jms2">WrappingByteMessage</a>, <a href="../../org/apache/openejb/resource/activemq/jms2/WrappingMapMessage.html" title="class in org.apache.openejb.resource.activemq.jms2">WrappingMapMessage</a>, <a href="../../org/apache/openejb/resource/activemq/jms2/WrappingObjectMessage.html" title="class in org.apache.openejb.resource.activemq.jms2">WrappingObjectMessage</a>, <a href="../../org/apache/openejb/resource/activemq/jms2/WrappingStreamMessage.html" title="class in org.apache.openejb.resource.activemq.jms2">WrappingStreamMessage</a>, <a href="../../org/apache/openejb/resource/activemq/jms2/WrappingTextMessage.html" title="class in org.apache.openejb.resource.activemq.jms2">WrappingTextMessage</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 JMS 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 JMS API to support all of these message models. |
| |
| <p> |
| With this in mind, the JMS 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> |
| JMS 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 JMS API defines several types of message body, which cover the majority of messaging styles currently |
| in use. |
| </ul> |
| |
| <h3>Message Bodies</h3> |
| |
| <p> |
| The JMS 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 JMS 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 JMS 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 JMS does not define a policy for |
| what should or should not be made a property, application developers should note that JMS 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, JMS 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 JMS API reserves the <code>JMSX</code> property name prefix for JMS defined properties. The full set of these |
| properties is defined in the Java Message Service specification. The specification also defines whether support for |
| each property is mandatory or optional. New JMS defined properties may be added in later versions of the JMS 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 JMS 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 JMS provider uses to |
| make its special per-message services available to a JMS client. |
| |
| <p> |
| The purpose of provider-specific properties is to provide special features needed to integrate JMS clients with |
| provider-native clients in a single JMS application. They should not be used for messaging between JMS clients. |
| |
| <h3>Provider Implementations of JMS Message Interfaces</h3> |
| |
| <p> |
| The JMS API provides a set of message interfaces that define the JMS message model. It does not provide |
| implementations of these interfaces. |
| |
| <p> |
| Each JMS 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 JMS 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="../../javax/jms/QueueReceiver.html" title="interface in javax.jms"><code>QueueReceiver</code></a> and <a href="../../javax/jms/TopicSubscriber.html" title="interface in javax.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 > 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 JMS 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>></code>, <code>>=</code>, <code><</code>, <code><=</code>, <code><></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><></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 BETWEEN 15 AND 19"</code> is equivalent to |
| <code>"age >= 15 AND age <= 19"</code> |
| <li><code>"age NOT BETWEEN 15 AND 19"</code> is equivalent to |
| <code>"age < 15 OR age > 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 IN (' UK', 'US', 'France')"</code> is true for <code>'UK'</code> and |
| false for <code>'Peru'</code>; it is equivalent to the expression |
| <code>"(Country = ' UK') OR (Country = ' US') OR (Country = ' France')"</code> |
| <li><code>"Country NOT IN (' UK', 'US', 'France')"</code> is false for |
| <code>'UK'</code> and true for <code>'Peru'</code>; it is equivalent to the expression |
| <code>"NOT ((Country = ' UK') OR (Country = ' US') OR (Country = ' 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 LIKE '12%3'"</code> is true for <code>'123'</code> or <code>'12993'</code> and false for |
| <code>'1234'</code> |
| <li><code>"word LIKE 'l_se'"</code> is true for <code>'lose'</code> and false for <code>'loose'</code> |
| <li><code>"underscored LIKE '\_%' ESCAPE '\'"</code> is true for <code>'_foo'</code> and false |
| for <code>'bar'</code> |
| <li><code>"phone NOT LIKE '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 IS 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 IS NOT NULL"</code> |
| </ul> |
| </ul> |
| |
| <p> |
| JMS 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>. JMS 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 = 'car' AND color = 'blue' AND weight > 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, JMS 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="../../javax/jms/MessageConsumer.html#receive--"><code>MessageConsumer.receive()</code></a>, |
| <a href="../../javax/jms/MessageConsumer.html#receive-long-"><code>MessageConsumer.receive(long)</code></a>, |
| <a href="../../javax/jms/MessageConsumer.html#receiveNoWait--"><code>MessageConsumer.receiveNoWait()</code></a>, |
| <a href="../../javax/jms/MessageListener.html#onMessage-javax.jms.Message-"><code>MessageListener.onMessage(Message)</code></a>, |
| <a href="../../javax/jms/BytesMessage.html" title="interface in javax.jms"><code>BytesMessage</code></a>, |
| <a href="../../javax/jms/MapMessage.html" title="interface in javax.jms"><code>MapMessage</code></a>, |
| <a href="../../javax/jms/ObjectMessage.html" title="interface in javax.jms"><code>ObjectMessage</code></a>, |
| <a href="../../javax/jms/StreamMessage.html" title="interface in javax.jms"><code>StreamMessage</code></a>, |
| <a href="../../javax/jms/TextMessage.html" title="interface in javax.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"> </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="../../javax/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="../../javax/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="../../javax/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="../../javax/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"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </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="../../javax/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="../../javax/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="../../javax/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><T> T</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/Message.html#getBody-java.lang.Class-">getBody</a></span>(java.lang.Class<T> 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="../../javax/jms/Message.html#getBooleanProperty-java.lang.String-">getBooleanProperty</a></span>(java.lang.String 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="../../javax/jms/Message.html#getByteProperty-java.lang.String-">getByteProperty</a></span>(java.lang.String 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="../../javax/jms/Message.html#getDoubleProperty-java.lang.String-">getDoubleProperty</a></span>(java.lang.String 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="../../javax/jms/Message.html#getFloatProperty-java.lang.String-">getFloatProperty</a></span>(java.lang.String 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="../../javax/jms/Message.html#getIntProperty-java.lang.String-">getIntProperty</a></span>(java.lang.String 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="../../javax/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="../../javax/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="../../javax/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="../../javax/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="../../javax/jms/Destination.html" title="interface in javax.jms">Destination</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/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="../../javax/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="../../javax/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="../../javax/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="../../javax/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="../../javax/jms/Destination.html" title="interface in javax.jms">Destination</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/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="../../javax/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="../../javax/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="../../javax/jms/Message.html#getLongProperty-java.lang.String-">getLongProperty</a></span>(java.lang.String 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="../../javax/jms/Message.html#getObjectProperty-java.lang.String-">getObjectProperty</a></span>(java.lang.String 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="../../javax/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="../../javax/jms/Message.html#getShortProperty-java.lang.String-">getShortProperty</a></span>(java.lang.String 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="../../javax/jms/Message.html#getStringProperty-java.lang.String-">getStringProperty</a></span>(java.lang.String 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="../../javax/jms/Message.html#isBodyAssignableTo-java.lang.Class-">isBodyAssignableTo</a></span>(java.lang.Class 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="../../javax/jms/Message.html#propertyExists-java.lang.String-">propertyExists</a></span>(java.lang.String 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="../../javax/jms/Message.html#setBooleanProperty-java.lang.String-boolean-">setBooleanProperty</a></span>(java.lang.String name, |
| boolean 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="../../javax/jms/Message.html#setByteProperty-java.lang.String-byte-">setByteProperty</a></span>(java.lang.String name, |
| byte 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="../../javax/jms/Message.html#setDoubleProperty-java.lang.String-double-">setDoubleProperty</a></span>(java.lang.String name, |
| double 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="../../javax/jms/Message.html#setFloatProperty-java.lang.String-float-">setFloatProperty</a></span>(java.lang.String name, |
| float 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="../../javax/jms/Message.html#setIntProperty-java.lang.String-int-">setIntProperty</a></span>(java.lang.String name, |
| int 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="../../javax/jms/Message.html#setJMSCorrelationID-java.lang.String-">setJMSCorrelationID</a></span>(java.lang.String 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="../../javax/jms/Message.html#setJMSCorrelationIDAsBytes-byte:A-">setJMSCorrelationIDAsBytes</a></span>(byte[] 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="../../javax/jms/Message.html#setJMSDeliveryMode-int-">setJMSDeliveryMode</a></span>(int 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="../../javax/jms/Message.html#setJMSDeliveryTime-long-">setJMSDeliveryTime</a></span>(long 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="../../javax/jms/Message.html#setJMSDestination-javax.jms.Destination-">setJMSDestination</a></span>(<a href="../../javax/jms/Destination.html" title="interface in javax.jms">Destination</a> 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="../../javax/jms/Message.html#setJMSExpiration-long-">setJMSExpiration</a></span>(long 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="../../javax/jms/Message.html#setJMSMessageID-java.lang.String-">setJMSMessageID</a></span>(java.lang.String 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="../../javax/jms/Message.html#setJMSPriority-int-">setJMSPriority</a></span>(int 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="../../javax/jms/Message.html#setJMSRedelivered-boolean-">setJMSRedelivered</a></span>(boolean 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="../../javax/jms/Message.html#setJMSReplyTo-javax.jms.Destination-">setJMSReplyTo</a></span>(<a href="../../javax/jms/Destination.html" title="interface in javax.jms">Destination</a> 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="../../javax/jms/Message.html#setJMSTimestamp-long-">setJMSTimestamp</a></span>(long 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="../../javax/jms/Message.html#setJMSType-java.lang.String-">setJMSType</a></span>(java.lang.String 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="../../javax/jms/Message.html#setLongProperty-java.lang.String-long-">setLongProperty</a></span>(java.lang.String name, |
| long 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="../../javax/jms/Message.html#setObjectProperty-java.lang.String-java.lang.Object-">setObjectProperty</a></span>(java.lang.String name, |
| java.lang.Object 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="../../javax/jms/Message.html#setShortProperty-java.lang.String-short-">setShortProperty</a></span>(java.lang.String name, |
| short 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="../../javax/jms/Message.html#setStringProperty-java.lang.String-java.lang.String-">setStringProperty</a></span>(java.lang.String name, |
| java.lang.String 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 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="../../javax/jms/DeliveryMode.html#PERSISTENT"><code>DeliveryMode.PERSISTENT</code></a>, |
| <a href="../../constant-values.html#javax.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 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#javax.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 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#javax.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 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#javax.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 getJMSMessageID() |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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 JMS 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 JMS client enables this potential optimization for all messages |
| sent by that message producer. If the JMS 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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to get the message ID due to some internal error.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/jms/Message.html#setJMSMessageID-java.lang.String-"><code>setJMSMessageID(String)</code></a>, |
| <a href="../../javax/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 setJMSMessageID(java.lang.String id) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre> |
| <div class="block">Sets the message ID. |
| |
| <p> |
| This method is for use by JMS 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 JMS 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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to set the message ID due to some internal error.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/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 getJMSTimestamp() |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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 JMS 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 JMS client enables this potential optimization for all |
| messages sent by that message producer. If the JMS 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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to get the timestamp due to some internal error.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/jms/Message.html#setJMSTimestamp-long-"><code>setJMSTimestamp(long)</code></a>, |
| <a href="../../javax/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 setJMSTimestamp(long timestamp) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre> |
| <div class="block">Sets the message timestamp. |
| |
| <p> |
| This method is for use by JMS 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 JMS 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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to set the timestamp due to some internal error.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/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[] getJMSCorrelationIDAsBytes() |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to get the correlation ID due to some internal error.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/jms/Message.html#setJMSCorrelationID-java.lang.String-"><code>setJMSCorrelationID(String)</code></a>, |
| <a href="../../javax/jms/Message.html#getJMSCorrelationID--"><code>getJMSCorrelationID()</code></a>, |
| <a href="../../javax/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 setJMSCorrelationIDAsBytes(byte[] correlationID) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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 JMS client may need to assign specific |
| <code>JMSCorrelationID</code> values to match those expected by native messaging clients. JMS 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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to set the correlation ID due to some internal error.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/jms/Message.html#setJMSCorrelationID-java.lang.String-"><code>setJMSCorrelationID(String)</code></a>, |
| <a href="../../javax/jms/Message.html#getJMSCorrelationID--"><code>getJMSCorrelationID()</code></a>, |
| <a href="../../javax/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 setJMSCorrelationID(java.lang.String correlationID) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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 JMS 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 JMS client may need to assign specific |
| <code>JMSCorrelationID</code> values to match those expected by clients that do not use the JMS API. A <code>byte[]</code> |
| value is used for this purpose. JMS 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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to set the correlation ID due to some internal error.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/jms/Message.html#getJMSCorrelationID--"><code>getJMSCorrelationID()</code></a>, |
| <a href="../../javax/jms/Message.html#getJMSCorrelationIDAsBytes--"><code>getJMSCorrelationIDAsBytes()</code></a>, |
| <a href="../../javax/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 getJMSCorrelationID() |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to get the correlation ID due to some internal error.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/jms/Message.html#setJMSCorrelationID-java.lang.String-"><code>setJMSCorrelationID(String)</code></a>, |
| <a href="../../javax/jms/Message.html#getJMSCorrelationIDAsBytes--"><code>getJMSCorrelationIDAsBytes()</code></a>, |
| <a href="../../javax/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="../../javax/jms/Destination.html" title="interface in javax.jms">Destination</a> getJMSReplyTo() |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS 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="../../javax/jms/Message.html#setJMSReplyTo-javax.jms.Destination-"><code>setJMSReplyTo(Destination)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setJMSReplyTo-javax.jms.Destination-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setJMSReplyTo</h4> |
| <pre>void setJMSReplyTo(<a href="../../javax/jms/Destination.html" title="interface in javax.jms">Destination</a> replyTo) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS 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="../../javax/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="../../javax/jms/Destination.html" title="interface in javax.jms">Destination</a> getJMSDestination() |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to get the destination due to some internal error.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/jms/Message.html#setJMSDestination-javax.jms.Destination-"><code>setJMSDestination(Destination)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setJMSDestination-javax.jms.Destination-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setJMSDestination</h4> |
| <pre>void setJMSDestination(<a href="../../javax/jms/Destination.html" title="interface in javax.jms">Destination</a> destination) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre> |
| <div class="block">Sets the <code>Destination</code> object for this message. |
| |
| <p> |
| This method is for use by JMS 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 JMS 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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to set the destination due to some internal error.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/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 getJMSDeliveryMode() |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to get the delivery mode due to some internal error.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/jms/Message.html#setJMSDeliveryMode-int-"><code>setJMSDeliveryMode(int)</code></a>, |
| <a href="../../javax/jms/DeliveryMode.html" title="interface in javax.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 setJMSDeliveryMode(int deliveryMode) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre> |
| <div class="block">Sets the <code>DeliveryMode</code> value for this message. |
| |
| <p> |
| This method is for use by JMS 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 JMS 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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to set the delivery mode due to some internal error.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/jms/Message.html#getJMSDeliveryMode--"><code>getJMSDeliveryMode()</code></a>, |
| <a href="../../javax/jms/DeliveryMode.html" title="interface in javax.jms"><code>DeliveryMode</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getJMSRedelivered--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getJMSRedelivered</h4> |
| <pre>boolean getJMSRedelivered() |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to get the redelivered state due to some internal error.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/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 setJMSRedelivered(boolean redelivered) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre> |
| <div class="block">Specifies whether this message is being redelivered. |
| |
| <p> |
| This method is for use by JMS 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 JMS 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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to set the redelivered state due to some internal error.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/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 getJMSType() |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to get the message type due to some internal error.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/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 setJMSType(java.lang.String type) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre> |
| <div class="block">Sets the message type. |
| |
| <p> |
| Some JMS 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 JMS 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 JMS providers, JMS 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, JMS 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 JMS 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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to set the message type due to some internal error.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/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 getJMSExpiration() |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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 JMS API does not define any form of |
| notification of message expiration. |
| |
| <p> |
| Clients should not receive messages that have expired; however, the JMS 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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to get the message expiration due to some internal error.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/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 setJMSExpiration(long expiration) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre> |
| <div class="block">Sets the message's expiration value. |
| |
| <p> |
| This method is for use by JMS 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 JMS 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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to set the message expiration due to some internal error.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/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 getJMSDeliveryTime() |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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 JMS 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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS 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="../../javax/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 setJMSDeliveryTime(long deliveryTime) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre> |
| <div class="block">Sets the message's delivery time value. |
| |
| <p> |
| This method is for use by JMS 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 JMS 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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS 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="../../javax/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 getJMSPriority() |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre> |
| <div class="block">Gets the message priority level. |
| |
| <p> |
| The JMS 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 JMS 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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to get the message priority due to some internal error.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/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 setJMSPriority(int priority) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre> |
| <div class="block">Sets the priority level for this message. |
| |
| <p> |
| This method is for use by JMS 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 JMS 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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to set the message priority due to some internal error.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/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 clearProperties() |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS 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 propertyExists(java.lang.String name) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS 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 getBooleanProperty(java.lang.String name) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to get the property value due to some internal error.</dd> |
| <dd><code><a href="../../javax/jms/MessageFormatException.html" title="class in javax.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 getByteProperty(java.lang.String name) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to get the property value due to some internal error.</dd> |
| <dd><code><a href="../../javax/jms/MessageFormatException.html" title="class in javax.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 getShortProperty(java.lang.String name) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to get the property value due to some internal error.</dd> |
| <dd><code><a href="../../javax/jms/MessageFormatException.html" title="class in javax.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 getIntProperty(java.lang.String name) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to get the property value due to some internal error.</dd> |
| <dd><code><a href="../../javax/jms/MessageFormatException.html" title="class in javax.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 getLongProperty(java.lang.String name) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to get the property value due to some internal error.</dd> |
| <dd><code><a href="../../javax/jms/MessageFormatException.html" title="class in javax.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 getFloatProperty(java.lang.String name) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to get the property value due to some internal error.</dd> |
| <dd><code><a href="../../javax/jms/MessageFormatException.html" title="class in javax.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 getDoubleProperty(java.lang.String name) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to get the property value due to some internal error.</dd> |
| <dd><code><a href="../../javax/jms/MessageFormatException.html" title="class in javax.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 getStringProperty(java.lang.String name) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to get the property value due to some internal error.</dd> |
| <dd><code><a href="../../javax/jms/MessageFormatException.html" title="class in javax.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 getObjectProperty(java.lang.String name) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS 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 getPropertyNames() |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre> |
| <div class="block">Returns an <code>Enumeration</code> of all the property names. |
| |
| <p> |
| Note that JMS 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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS 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 setBooleanProperty(java.lang.String name, |
| boolean value) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS 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="../../javax/jms/MessageNotWriteableException.html" title="class in javax.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 setByteProperty(java.lang.String name, |
| byte value) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS 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="../../javax/jms/MessageNotWriteableException.html" title="class in javax.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 setShortProperty(java.lang.String name, |
| short value) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS 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="../../javax/jms/MessageNotWriteableException.html" title="class in javax.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 setIntProperty(java.lang.String name, |
| int value) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS 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="../../javax/jms/MessageNotWriteableException.html" title="class in javax.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 setLongProperty(java.lang.String name, |
| long value) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS 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="../../javax/jms/MessageNotWriteableException.html" title="class in javax.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 setFloatProperty(java.lang.String name, |
| float value) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS 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="../../javax/jms/MessageNotWriteableException.html" title="class in javax.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 setDoubleProperty(java.lang.String name, |
| double value) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS 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="../../javax/jms/MessageNotWriteableException.html" title="class in javax.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 setStringProperty(java.lang.String name, |
| java.lang.String value) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS 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="../../javax/jms/MessageNotWriteableException.html" title="class in javax.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 setObjectProperty(java.lang.String name, |
| java.lang.Object value) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS 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="../../javax/jms/MessageFormatException.html" title="class in javax.jms">MessageFormatException</a></code> - if the object is invalid</dd> |
| <dd><code><a href="../../javax/jms/MessageNotWriteableException.html" title="class in javax.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 acknowledge() |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre> |
| <div class="block">Acknowledges all consumed messages of the session of this consumed message. |
| |
| <p> |
| All consumed JMS 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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to acknowledge the messages due to some internal error.</dd> |
| <dd><code><a href="../../javax/jms/IllegalStateException.html" title="class in javax.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="../../javax/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 clearBody() |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS 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><T> T getBody(java.lang.Class<T> c) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/MessageFormatException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS 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 isBodyAssignableTo(java.lang.Class c) |
| throws <a href="../../javax/jms/JMSException.html" title="class in javax.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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS 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="../../javax/jms/MapMessage.html" title="interface in javax.jms"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../javax/jms/MessageConsumer.html" title="interface in javax.jms"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../index.html?javax/jms/Message.html" target="_top">Frames</a></li> |
| <li><a href="Message.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../allclasses-noframe.html">All 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: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |