View Javadoc

1   /**
2    *
3    * Copyright 2003-2004 The Apache Software Foundation
4    *
5    *  Licensed under the Apache License, Version 2.0 (the "License");
6    *  you may not use this file except in compliance with the License.
7    *  You may obtain a copy of the License at
8    *
9    *     http://www.apache.org/licenses/LICENSE-2.0
10   *
11   *  Unless required by applicable law or agreed to in writing, software
12   *  distributed under the License is distributed on an "AS IS" BASIS,
13   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   *  See the License for the specific language governing permissions and
15   *  limitations under the License.
16   */
17  
18  //
19  // This source code implements specifications defined by the Java
20  // Community Process. In order to remain compliant with the specification
21  // DO NOT add / change / or delete method signatures!
22  //
23  
24  package javax.jms;
25  
26  import java.util.Enumeration;
27  
28  /**
29   * @version $Rev: 46019 $ $Date: 2004-09-14 02:56:06 -0700 (Tue, 14 Sep 2004) $
30   */
31  public interface Message {
32  
33      static final int DEFAULT_DELIVERY_MODE = DeliveryMode.PERSISTENT;
34  
35      static final int DEFAULT_PRIORITY = 4;
36  
37      static final long DEFAULT_TIME_TO_LIVE = 0;
38  
39      String getJMSMessageID() throws JMSException;
40  
41      void setJMSMessageID(String id) throws JMSException;
42  
43      long getJMSTimestamp() throws JMSException;
44  
45      void setJMSTimestamp(long timestamp) throws JMSException;
46  
47      byte[] getJMSCorrelationIDAsBytes() throws JMSException;
48  
49      void setJMSCorrelationIDAsBytes(byte[] correlationID) throws JMSException;
50  
51      void setJMSCorrelationID(String correlationID) throws JMSException;
52  
53      String getJMSCorrelationID() throws JMSException;
54  
55      Destination getJMSReplyTo() throws JMSException;
56  
57      void setJMSReplyTo(Destination replyTo) throws JMSException;
58  
59      Destination getJMSDestination() throws JMSException;
60  
61      void setJMSDestination(Destination destination) throws JMSException;
62  
63      int getJMSDeliveryMode() throws JMSException;
64  
65      void setJMSDeliveryMode(int deliveryMode) throws JMSException;
66  
67      boolean getJMSRedelivered() throws JMSException;
68  
69      void setJMSRedelivered(boolean redelivered) throws JMSException;
70  
71      String getJMSType() throws JMSException;
72  
73      void setJMSType(String type) throws JMSException;
74  
75      long getJMSExpiration() throws JMSException;
76  
77      void setJMSExpiration(long expiration) throws JMSException;
78  
79      int getJMSPriority() throws JMSException;
80  
81      void setJMSPriority(int priority) throws JMSException;
82  
83      void clearProperties() throws JMSException;
84  
85      boolean propertyExists(String name) throws JMSException;
86  
87      boolean getBooleanProperty(String name) throws JMSException;
88  
89      byte getByteProperty(String name) throws JMSException;
90  
91      short getShortProperty(String name) throws JMSException;
92  
93      int getIntProperty(String name) throws JMSException;
94  
95      long getLongProperty(String name) throws JMSException;
96  
97      float getFloatProperty(String name) throws JMSException;
98  
99      double getDoubleProperty(String name) throws JMSException;
100 
101     String getStringProperty(String name) throws JMSException;
102 
103     Object getObjectProperty(String name) throws JMSException;
104 
105     Enumeration getPropertyNames() throws JMSException;
106 
107     void setBooleanProperty(String name, boolean value) throws JMSException;
108 
109     void setByteProperty(String name, byte value) throws JMSException;
110 
111     void setShortProperty(String name, short value) throws JMSException;
112 
113     void setIntProperty(String name, int value) throws JMSException;
114 
115     void setLongProperty(String name, long value) throws JMSException;
116 
117     void setFloatProperty(String name, float value) throws JMSException;
118 
119     void setDoubleProperty(String name, double value) throws JMSException;
120 
121     void setStringProperty(String name, String value) throws JMSException;
122 
123     void setObjectProperty(String name, Object value) throws JMSException;
124 
125     void acknowledge() throws JMSException;
126 
127     void clearBody() throws JMSException;
128 }