001 /*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements. See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership. The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License. You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing,
013 * software distributed under the License is distributed on an
014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 * KIND, either express or implied. See the License for the
016 * specific language governing permissions and limitations
017 * under the License.
018 */
019
020 //
021 // This source code implements specifications defined by the Java
022 // Community Process. In order to remain compliant with the specification
023 // DO NOT add / change / or delete method signatures!
024 //
025
026 package javax.jms;
027
028 import java.util.Enumeration;
029
030 /**
031 * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
032 */
033 public interface Message {
034
035 static final int DEFAULT_DELIVERY_MODE = DeliveryMode.PERSISTENT;
036
037 static final int DEFAULT_PRIORITY = 4;
038
039 static final long DEFAULT_TIME_TO_LIVE = 0;
040
041 String getJMSMessageID() throws JMSException;
042
043 void setJMSMessageID(String id) throws JMSException;
044
045 long getJMSTimestamp() throws JMSException;
046
047 void setJMSTimestamp(long timestamp) throws JMSException;
048
049 byte[] getJMSCorrelationIDAsBytes() throws JMSException;
050
051 void setJMSCorrelationIDAsBytes(byte[] correlationID) throws JMSException;
052
053 void setJMSCorrelationID(String correlationID) throws JMSException;
054
055 String getJMSCorrelationID() throws JMSException;
056
057 Destination getJMSReplyTo() throws JMSException;
058
059 void setJMSReplyTo(Destination replyTo) throws JMSException;
060
061 Destination getJMSDestination() throws JMSException;
062
063 void setJMSDestination(Destination destination) throws JMSException;
064
065 int getJMSDeliveryMode() throws JMSException;
066
067 void setJMSDeliveryMode(int deliveryMode) throws JMSException;
068
069 boolean getJMSRedelivered() throws JMSException;
070
071 void setJMSRedelivered(boolean redelivered) throws JMSException;
072
073 String getJMSType() throws JMSException;
074
075 void setJMSType(String type) throws JMSException;
076
077 long getJMSExpiration() throws JMSException;
078
079 void setJMSExpiration(long expiration) throws JMSException;
080
081 int getJMSPriority() throws JMSException;
082
083 void setJMSPriority(int priority) throws JMSException;
084
085 void clearProperties() throws JMSException;
086
087 boolean propertyExists(String name) throws JMSException;
088
089 boolean getBooleanProperty(String name) throws JMSException;
090
091 byte getByteProperty(String name) throws JMSException;
092
093 short getShortProperty(String name) throws JMSException;
094
095 int getIntProperty(String name) throws JMSException;
096
097 long getLongProperty(String name) throws JMSException;
098
099 float getFloatProperty(String name) throws JMSException;
100
101 double getDoubleProperty(String name) throws JMSException;
102
103 String getStringProperty(String name) throws JMSException;
104
105 Object getObjectProperty(String name) throws JMSException;
106
107 Enumeration getPropertyNames() throws JMSException;
108
109 void setBooleanProperty(String name, boolean value) throws JMSException;
110
111 void setByteProperty(String name, byte value) throws JMSException;
112
113 void setShortProperty(String name, short value) throws JMSException;
114
115 void setIntProperty(String name, int value) throws JMSException;
116
117 void setLongProperty(String name, long value) throws JMSException;
118
119 void setFloatProperty(String name, float value) throws JMSException;
120
121 void setDoubleProperty(String name, double value) throws JMSException;
122
123 void setStringProperty(String name, String value) throws JMSException;
124
125 void setObjectProperty(String name, Object value) throws JMSException;
126
127 void acknowledge() throws JMSException;
128
129 void clearBody() throws JMSException;
130 }