KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > axis > transport > jms > JMSConstants


1 /*
2  * The Apache Software License, Version 1.1
3  *
4  *
5  * Copyright (c) 2001, 2002 The Apache Software Foundation. All rights
6  * reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in
17  * the documentation and/or other materials provided with the
18  * distribution.
19  *
20  * 3. The end-user documentation included with the redistribution,
21  * if any, must include the following acknowledgment:
22  * "This product includes software developed by the
23  * Apache Software Foundation (http://www.apache.org/)."
24  * Alternately, this acknowledgment may appear in the software itself,
25  * if and wherever such third-party acknowledgments normally appear.
26  *
27  * 4. The names "Axis" and "Apache Software Foundation" must
28  * not be used to endorse or promote products derived from this
29  * software without prior written permission. For written
30  * permission, please contact apache@apache.org.
31  *
32  * 5. Products derived from this software may not be called "Apache",
33  * nor may "Apache" appear in their name, without prior written
34  * permission of the Apache Software Foundation.
35  *
36  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
37  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
38  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39  * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
40  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
42  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
43  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
44  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
45  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
46  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
47  * SUCH DAMAGE.
48  * ====================================================================
49  *
50  * This software consists of voluntary contributions made by many
51  * individuals on behalf of the Apache Software Foundation. For more
52  * information on the Apache Software Foundation, please see
53  * <http://www.apache.org/>.
54  */

55
56 package org.jboss.axis.transport.jms;
57
58 import javax.jms.DeliveryMode JavaDoc;
59 import javax.jms.Message JavaDoc;
60 import javax.jms.Session JavaDoc;
61
62 /**
63  * JMSConstants contains constants that apply to all JMS providers.
64  *
65  * <code>JMSConstants</code> contains the constant definitions for
66  * interacting with the WSClient. The most important constants are the
67  * <code>HashMap</code> keys for use in the arguments to the
68  * <code>send, call, registerListener, unregisterListener</code> methods of
69  * <code>JMSEndpoint</code> and the <code>createConnector</code> method of
70  * <code>JMSConnectorFactory</code>.
71  *
72  * @author Jaime Meritt (jmeritt@sonicsoftware.com)
73  * @author Richard Chung (rchung@sonicsoftware.com)
74  * @author Dave Chappell (chappell@sonicsoftware.com)
75  */

76
77 public interface JMSConstants
78 {
79
80    /**
81     * This is used as a key in the Call properties telling the JMS transport
82     * to wait for a response from the service. The default value is true.
83     * If false is specified, the message will be delivered without specifying
84     * a ReplyTo. The client will always return null from invoke unless
85     * a client-side exception is thrown (similar to invokeOneWay in semantics)
86     * The value must be a <code>java.lang.Boolean</code>.
87     * See the javax.jms javadoc for information on this property.
88     */

89    final static String JavaDoc WAIT_FOR_RESPONSE = "transport.jms.WaitForResponse";
90
91    /**
92     * <code>JMSConnectorFactory</code> parameter valid for either domain. This should
93     * be used as a key in the environment map passed into calls to
94     * <code>createConnector</code> in <code>JMSConnectorFactory</code>
95     * This is a required property for durable subscribers.
96     * The value must be a <code>java.lang.String</code>.
97     * See the javax.jms javadoc for information on this property.
98     */

99    final static String JavaDoc CLIENT_ID = "transport.jms.ClientID";
100
101    final static String JavaDoc DESTINATION = "transport.jms.Destination";
102
103    final static String JavaDoc CONNECTOR = "transport.jms.Connector";
104
105    final static String JavaDoc DOMAIN = "transport.jms.Domain";
106
107    final static String JavaDoc DOMAIN_QUEUE = "QUEUE";
108
109    final static String JavaDoc DOMAIN_TOPIC = "TOPIC";
110
111    final static String JavaDoc DOMAIN_DEFAULT = DOMAIN_QUEUE;
112
113    /**
114     * Key for properties used in the <code>send</code> and <code>call</code>
115     * methods. It is valid for either domain.
116     * The value must be a <code>java.lang.String</code>.
117     * See the javax.jms javadoc for information on this property.
118     */

119    final static String JavaDoc JMS_CORRELATION_ID = "transport.jms.JMSCorrelationID";
120    /**
121     * Key for properties used in the <code>send</code> and <code>call</code>
122     * methods. It is valid for either domain.
123     * The value must be a <code>byte[]</code>.
124     * See the javax.jms javadoc for information on this property.
125     */

126    final static String JavaDoc JMS_CORRELATION_ID_AS_BYTES = "transport.jms.JMSCorrelationIDAsBytes";
127    /**
128     * Key for properties used in the <code>send</code> and <code>call</code>
129     * methods. It is valid for either domain.
130     * The value must be a <code>java.lang.String</code>.
131     * See the javax.jms javadoc for information on this property.
132     */

133    final static String JavaDoc JMS_TYPE = "transport.jms.JMSType";
134    /**
135     * Key for properties used in the <code>send</code> and <code>call</code>
136     * methods. It is valid for either domain.
137     * The value must be a <code>java.lang.Long</code>.
138     * See the javax.jms javadoc for information on this property.
139     */

140    final static String JavaDoc TIME_TO_LIVE = "transport.jms.TimeToLive";
141    /**
142     * Key for properties used in the <code>send</code> and <code>call</code>
143     * methods. It is valid for either domain.
144     * The value must be a <code>java.lang.Integer</code>.
145     * See the javax.jms javadoc for information on this property.
146     */

147    final static String JavaDoc PRIORITY = "transport.jms.Priority";
148    /**
149     * Key for properties used in the <code>send</code> and <code>call</code>
150     * methods. It is valid for either domain.
151     * The value must be a <code>java.lang.Integer</code> equal to
152     * DeliveryMode.NON_PERSISTENT or DeliveryMode.PERSISTENT.
153     * See the javax.jms javadoc for information on this property.
154     */

155    final static String JavaDoc DELIVERY_MODE = "transport.jms.DeliveryMode";
156
157    final static int DEFAULT_DELIVERY_MODE = DeliveryMode.NON_PERSISTENT;
158    final static int DEFAULT_PRIORITY = Message.DEFAULT_PRIORITY;
159    final static long DEFAULT_TIME_TO_LIVE = Message.DEFAULT_TIME_TO_LIVE;
160
161    /**
162     * Key for properties used in the <code>registerListener</code>
163     * method. It is valid for either domain.
164     * The value must be a <code>java.lang.String</code>.
165     * See the javax.jms javadoc for information on this property.
166     */

167    final static String JavaDoc MESSAGE_SELECTOR = "transport.jms.MessageSelector";
168    /**
169     * Key for properties used in the <code>registerListener</code>
170     * method. It is valid for either domain.
171     * The value must be a <code>java.lang.Integer</code> that is one of
172     * Session.AUTO_ACKNOWLEDGE, Session.DUPS_OK_ACKNOWLEDGE,
173     * or Session.CLIENT_ACKNOWLEDGE.
174     * See the javax.jms javadoc for information on this property.
175     */

176    final static String JavaDoc ACKNOWLEDGE_MODE = "transport.jms.AcknowledgeMode";
177
178    /**
179     * value for ACKNOWLEDGE_MODE if left unset. It is equal to
180     * Session.DUPS_OK_ACKNOWLEDGE.
181     */

182    final static int DEFAULT_ACKNOWLEDGE_MODE = Session.DUPS_OK_ACKNOWLEDGE;
183
184    /**
185     * Specifies the name of a durable subscription
186     * Key for properties used in the <code>registerListener</code>
187     * method. It is valid for the PubSub domain.
188     * The value must be a <code>java.lang.String</code>.
189     */

190    final static String JavaDoc SUBSCRIPTION_NAME = "transport.jms.SubscriptionName";
191    /**
192     * Key for properties used in the <code>registerListener</code>
193     * method. It is valid for the PubSub domain.
194     * Specifies that the durable subscription should be unsubscribed
195     * (deleted from the broker) when unregistered.
196     * The value must be a <code>java.lang.Boolean</code>.
197     */

198    final static String JavaDoc UNSUBSCRIBE = "transport.jms.Unsubscribe";
199    /**
200     * Key for properties used in the <code>registerListener</code>
201     * method. It is valid for the PubSub domain.
202     * The value must be a <code>java.lang.Boolean</code>.
203     */

204    final static String JavaDoc NO_LOCAL = "transport.jms.NoLocal";
205
206    final static boolean DEFAULT_NO_LOCAL = false;
207    final static boolean DEFAULT_UNSUBSCRIBE = false;
208
209
210    /**
211     * Key for properties used in the <code>createConnector</code>
212     * method. It changes the behavior of the wsclient.
213     * The value must be a <code>java.lang.Integer</code>.
214     */

215    final static String JavaDoc NUM_RETRIES = "transport.jms.NumRetries";
216    /**
217     * Key for properties used in the <code>createConnector</code>
218     * method. It changes the behavior of the wsclient.
219     * The value must be a <code>java.lang.Integer</code>.
220     */

221    final static String JavaDoc NUM_SESSIONS = "transport.jms.NumSessions";
222    /**
223     * Key for properties used in the <code>createConnector</code>
224     * method. It changes the behavior of the wsclient.
225     * The value must be a <code>java.lang.Long</code>.
226     */

227    final static String JavaDoc CONNECT_RETRY_INTERVAL = "transport.jms.ConnectRetryInterval";
228    /**
229     * Key for properties used in the <code>createConnector</code>
230     * method. It changes the behavior of the wsclient.
231     * The value must be a <code>java.lang.Long</code>.
232     */

233    final static String JavaDoc INTERACT_RETRY_INTERVAL = "transport.jms.InteractRetryInterval";
234    /**
235     * Key for properties used in the <code>createConnector</code>
236     * method. It changes the behavior of the wsclient.
237     * The value must be a <code>java.lang.Long</code>.
238     */

239    final static String JavaDoc TIMEOUT_TIME = "transport.jms.TimeoutTime";
240    /**
241     * Key for properties used in the <code>createConnector</code>
242     * method. It changes the behavior of the wsclient.
243     * The value must be a <code>java.lang.Long</code>.
244     */

245    final static String JavaDoc MIN_TIMEOUT_TIME = "transport.jms.MinTimeoutTime";
246
247    final static int DEFAULT_NUM_RETRIES = 5;
248    final static int DEFAULT_NUM_SESSIONS = 5;
249
250    final static long DEFAULT_CONNECT_RETRY_INTERVAL = 2000;
251    final static long DEFAULT_TIMEOUT_TIME = 5000;
252    final static long DEFAULT_MIN_TIMEOUT_TIME = 1000;
253    final static long DEFAULT_INTERACT_RETRY_INTERVAL = 250;
254
255 }
Popular Tags