001: /*
002: * Copyright 2004,2005 The Apache Software Foundation.
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016: package org.apache.synapse.transport.jms;
017:
018: import org.apache.axis2.Constants;
019: import org.apache.axis2.client.Options;
020:
021: import javax.xml.namespace.QName;
022:
023: public class JMSConstants {
024:
025: /**
026: * The prefix indicating an Axis JMS URL
027: */
028: public static final String JMS_PREFIX = "jms:/";
029:
030: public static final String ACTIVEMQ_DYNAMIC_QUEUE = "dynamicQueues/";
031: public static final String ACTIVEMQ_DYNAMIC_TOPIC = "dynamicTopics/";
032:
033: //------------------------------------ defaults ------------------------------------
034: /**
035: * The local (Axis2) JMS connection factory name of the default connection
036: * factory to be used, if a service does not explicitly state the connection
037: * factory it should be using by a Parameter named JMSConstants.CONFAC_PARAM
038: */
039: public static final String DEFAULT_CONFAC_NAME = "default";
040: /**
041: * The default JMS time out waiting for a reply
042: */
043: public static final long DEFAULT_JMS_TIMEOUT = Options.DEFAULT_TIMEOUT_MILLISECONDS;
044:
045: //-------------------------- services.xml parameters --------------------------------
046: /**
047: * The Parameter name indicating a JMS destination for requests
048: */
049: public static final String DEST_PARAM = "transport.jms.Destination";
050: /**
051: * The Parameter name indicating a JMS destination type for requests. i.e. DESTINATION_TYPE_QUEUE, DESTINATION_TYPE_TOPIC
052: */
053: public static final String DEST_PARAM_TYPE = "transport.jms.DestinationType";
054: /**
055: * The Parameter name indicating the response JMS destination
056: */
057: public static final String REPLY_PARAM = "transport.jms.ReplyDestination";
058: /**
059: * The Parameter name indicating the response JMS destination. i.e. DESTINATION_TYPE_QUEUE, DESTINATION_TYPE_TOPIC
060: */
061: public static final String REPLY_PARAM_TYPE = "transport.jms.ReplyDestinationType";
062:
063: /**
064: * Values used for DEST_PARAM_TYPE, REPLY_PARAM_TYPE
065: */
066: public static final String DESTINATION_TYPE_QUEUE = "queue";
067: public static final String DESTINATION_TYPE_TOPIC = "topic";
068:
069: /**
070: * The Parameter name of an Axis2 service, indicating the JMS connection
071: * factory which should be used to listen for messages for it. This is
072: * the local (Axis2) name of the connection factory and not the JNDI name
073: */
074: public static final String CONFAC_PARAM = "transport.jms.ConnectionFactory";
075: /**
076: * If reconnect timeout if connection error occurs in seconds
077: */
078: public static final String RECONNECT_TIMEOUT = "transport.jms.ReconnectTimeout";
079: /**
080: * Connection factory type if using JMS 1.0, either DESTINATION_TYPE_QUEUE or DESTINATION_TYPE_TOPIC
081: */
082: public static final String CONFAC_TYPE = "transport.jms.ConnectionFactoryType";
083: /**
084: * The Parameter name indicating the JMS connection factory JNDI name
085: */
086: public static final String CONFAC_JNDI_NAME_PARAM = "transport.jms.ConnectionFactoryJNDIName";
087:
088: //------------ message context / transport header properties and client options ------------
089: /**
090: * A MessageContext property or client Option stating the JMS message type
091: */
092: public static final String JMS_MESSAGE_TYPE = "JMS_MESSAGE_TYPE";
093: /**
094: * The message type indicating a BytesMessage. See JMS_MESSAGE_TYPE
095: */
096: public static final String JMS_BYTE_MESSAGE = "JMS_BYTE_MESSAGE";
097: /**
098: * The message type indicating a TextMessage. See JMS_MESSAGE_TYPE
099: */
100: public static final String JMS_TEXT_MESSAGE = "JMS_TEXT_MESSAGE";
101: /**
102: * A MessageContext property or client Option stating the time to wait for a response JMS message
103: */
104: public static final String JMS_WAIT_REPLY = "JMS_WAIT_REPLY";
105: /**
106: * A MessageContext property or client Option stating the JMS correlation id
107: */
108: public static final String JMS_COORELATION_ID = "JMS_COORELATION_ID";
109: /**
110: * A MessageContext property or client Option stating the JMS message id
111: */
112: public static final String JMS_MESSAGE_ID = "JMS_MESSAGE_ID";
113: /**
114: * A MessageContext property or client Option stating the JMS delivery mode
115: */
116: public static final String JMS_DELIVERY_MODE = "JMS_DELIVERY_MODE";
117: /**
118: * A MessageContext property or client Option stating the JMS destination
119: */
120: public static final String JMS_DESTINATION = "JMS_DESTINATION";
121: /**
122: * A MessageContext property or client Option stating the JMS expiration
123: */
124: public static final String JMS_EXPIRATION = "JMS_EXPIRATION";
125: /**
126: * A MessageContext property or client Option stating the JMS priority
127: */
128: public static final String JMS_PRIORITY = "JMS_PRIORITY";
129: /**
130: * A MessageContext property stating if the message is a redelivery
131: */
132: public static final String JMS_REDELIVERED = "JMS_REDELIVERED";
133: /**
134: * A MessageContext property or client Option stating the JMS replyTo
135: */
136: public static final String JMS_REPLY_TO = "JMS_REPLY_TO";
137: /**
138: * A MessageContext property or client Option stating the JMS timestamp
139: */
140: public static final String JMS_TIMESTAMP = "JMS_TIMESTAMP";
141: /**
142: * A MessageContext property or client Option stating the JMS type
143: */
144: public static final String JMS_TYPE = "JMS_TYPE";
145: }
|