Source code: org/activemq/transport/RemoteNetworkConnector.java
1 /**
2 *
3 * Copyright 2004 Protique Ltd
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 **/
18 package org.activemq.transport;
19
20 import org.activemq.broker.BrokerContainer;
21
22 /**
23 * Represents a connector to one or more remote brokers.
24 * This class manages a number of {@link NetworkChannel} instances
25 * which may or may not be connected to a
26 * remote broker at any point in time.
27 * <p/>
28 * The implementation of this class could use a fixed number of
29 * configured {@link NetworkChannel} instances or could use
30 * discovery to find them.
31 *
32 * @version $Revision: 1.1.1.1 $
33 */
34 public class RemoteNetworkConnector extends NetworkConnector {
35
36
37 /**
38 * RemoteNetworkConnector
39 * @param brokerContainer
40 */
41 public RemoteNetworkConnector(BrokerContainer brokerContainer) {
42 super(brokerContainer);
43 }
44
45 /**
46 * Create a channel from the url
47 * @param url
48 * @return
49 */
50 protected NetworkChannel createNetworkChannel(String url) {
51 NetworkChannel answer = new RemoteNetworkChannel(this,getBrokerContainer(), url);
52 answer.setRemoteUserName(getRemoteUserName());
53 answer.setRemotePassword(getRemotePassword());
54 return answer;
55 }
56
57 }