ConnectionURL.java
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 org.apache.qpid.framing.AMQShortString;
24 import org.apache.qpid.framing.ProtocolVersion;
25 
26 import java.util.List;
27 
28 /**
29  Connection URL format
30  amqp://[user:pass@][clientid]/virtualhost?brokerlist='tcp://host:port?option=\'value\'&option=\'value\';vm://:3/virtualpath?option=\'value\''&failover='method?option=\'value\'&option='value''"
31  Options are of course optional except for requiring a single broker in the broker list.
32  The option seperator is defined to be either '&' or ','
33   */
34 public interface ConnectionURL
35 {
36     public static final String AMQ_SYNC_PERSISTENCE = "sync_persistence";
37     public static final String AMQ_MAXPREFETCH = "maxprefetch";
38     public static final String AMQ_PROTOCOL = "amqp";
39     public static final String OPTIONS_BROKERLIST = "brokerlist";
40     public static final String OPTIONS_FAILOVER = "failover";
41     public static final String OPTIONS_FAILOVER_CYCLE = "cyclecount";
42     public static final String OPTIONS_SSL = "ssl";
43     public static final String OPTIONS_DEFAULT_TOPIC_EXCHANGE = "defaultTopicExchange";
44     public static final String OPTIONS_DEFAULT_QUEUE_EXCHANGE = "defaultQueueExchange";
45     public static final String OPTIONS_TEMPORARY_TOPIC_EXCHANGE = "temporaryTopicExchange";
46     public static final String OPTIONS_TEMPORARY_QUEUE_EXCHANGE = "temporaryQueueExchange";
47     public static final byte  URL_0_8 = 1;
48     public static final byte  URL_0_10 = 2;
49     
50     String getURL();
51 
52     String getFailoverMethod();
53 
54     String getFailoverOption(String key);
55 
56     int getBrokerCount();
57 
58     BrokerDetails getBrokerDetails(int index);
59 
60     void addBrokerDetails(BrokerDetails broker);
61 
62     void setBrokerDetails(List<BrokerDetails> brokers);
63 
64     List<BrokerDetails> getAllBrokerDetails();
65 
66     String getClientName();
67 
68     void setClientName(String clientName);
69 
70     String getUsername();
71 
72     void setUsername(String username);
73 
74     String getPassword();
75 
76     void setPassword(String password);
77 
78     String getVirtualHost();
79 
80     void setVirtualHost(String virtualHost);
81 
82     String getOption(String key);
83 
84     void setOption(String key, String value);
85 
86     AMQShortString getDefaultQueueExchangeName();
87 
88     AMQShortString getDefaultTopicExchangeName();
89 
90     AMQShortString getTemporaryQueueExchangeName();
91 
92     AMQShortString getTemporaryTopicExchangeName();
93 
94 }