01 /*
02 *
03 * Licensed to the Apache Software Foundation (ASF) under one
04 * or more contributor license agreements. See the NOTICE file
05 * distributed with this work for additional information
06 * regarding copyright ownership. The ASF licenses this file
07 * to you under the Apache License, Version 2.0 (the
08 * "License"); you may not use this file except in compliance
09 * with the License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 */
21 package org.apache.qpid.jms;
22
23 import java.io.UnsupportedEncodingException;
24
25 import javax.jms.Destination;
26 import javax.jms.JMSException;
27 import javax.jms.Message;
28
29 /**
30 */
31 public interface MessageProducer extends javax.jms.MessageProducer
32 {
33 /**
34 * Set the default MIME type for messages produced by this producer. This reduces the overhead of each message.
35 * @param mimeType
36 */
37 void setMimeType(String mimeType) throws JMSException;
38
39 /**
40 * Set the default encoding for messages produced by this producer. This reduces the overhead of each message.
41 * @param encoding the encoding as understood by XXXX how do I specify this?? RG
42 * @throws UnsupportedEncodingException if the encoding is not understood
43 */
44 void setEncoding(String encoding) throws UnsupportedEncodingException, JMSException;
45
46 void send(Destination destination, Message message, int deliveryMode,
47 int priority, long timeToLive, boolean immediate)
48 throws JMSException;
49
50 void send(Destination destination, Message message, int deliveryMode,
51 int priority, long timeToLive, boolean mandatory, boolean immediate)
52 throws JMSException;
53
54 void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive,
55 boolean mandatory, boolean immediate, boolean waitUntilSent) throws JMSException;
56
57 }
|