001    /**
002     *
003     * Copyright 2003-2004 The Apache Software Foundation
004     *
005     *  Licensed under the Apache License, Version 2.0 (the "License");
006     *  you may not use this file except in compliance with the License.
007     *  You may obtain a copy of the License at
008     *
009     *     http://www.apache.org/licenses/LICENSE-2.0
010     *
011     *  Unless required by applicable law or agreed to in writing, software
012     *  distributed under the License is distributed on an "AS IS" BASIS,
013     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     *  See the License for the specific language governing permissions and
015     *  limitations under the License.
016     */
017    
018    //
019    // This source code implements specifications defined by the Java
020    // Community Process. In order to remain compliant with the specification
021    // DO NOT add / change / or delete method signatures!
022    //
023    
024    package javax.jms;
025    
026    import java.util.Enumeration;
027    
028    /**
029     * @version $Rev: 46019 $ $Date: 2004-09-14 02:56:06 -0700 (Tue, 14 Sep 2004) $
030     */
031    public interface Message {
032    
033        static final int DEFAULT_DELIVERY_MODE = DeliveryMode.PERSISTENT;
034    
035        static final int DEFAULT_PRIORITY = 4;
036    
037        static final long DEFAULT_TIME_TO_LIVE = 0;
038    
039        String getJMSMessageID() throws JMSException;
040    
041        void setJMSMessageID(String id) throws JMSException;
042    
043        long getJMSTimestamp() throws JMSException;
044    
045        void setJMSTimestamp(long timestamp) throws JMSException;
046    
047        byte[] getJMSCorrelationIDAsBytes() throws JMSException;
048    
049        void setJMSCorrelationIDAsBytes(byte[] correlationID) throws JMSException;
050    
051        void setJMSCorrelationID(String correlationID) throws JMSException;
052    
053        String getJMSCorrelationID() throws JMSException;
054    
055        Destination getJMSReplyTo() throws JMSException;
056    
057        void setJMSReplyTo(Destination replyTo) throws JMSException;
058    
059        Destination getJMSDestination() throws JMSException;
060    
061        void setJMSDestination(Destination destination) throws JMSException;
062    
063        int getJMSDeliveryMode() throws JMSException;
064    
065        void setJMSDeliveryMode(int deliveryMode) throws JMSException;
066    
067        boolean getJMSRedelivered() throws JMSException;
068    
069        void setJMSRedelivered(boolean redelivered) throws JMSException;
070    
071        String getJMSType() throws JMSException;
072    
073        void setJMSType(String type) throws JMSException;
074    
075        long getJMSExpiration() throws JMSException;
076    
077        void setJMSExpiration(long expiration) throws JMSException;
078    
079        int getJMSPriority() throws JMSException;
080    
081        void setJMSPriority(int priority) throws JMSException;
082    
083        void clearProperties() throws JMSException;
084    
085        boolean propertyExists(String name) throws JMSException;
086    
087        boolean getBooleanProperty(String name) throws JMSException;
088    
089        byte getByteProperty(String name) throws JMSException;
090    
091        short getShortProperty(String name) throws JMSException;
092    
093        int getIntProperty(String name) throws JMSException;
094    
095        long getLongProperty(String name) throws JMSException;
096    
097        float getFloatProperty(String name) throws JMSException;
098    
099        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    }