001 /**
002 *
003 * Copyright 2004 Protique Ltd
004 *
005 * Licensed under the Apache License, Version 2.0 (the "License");
006 * you may not use this file except in compliance with the License.
007 * You may obtain a copy of the License at
008 *
009 * http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 *
017 **/
018 package org.activemq.transport;
019
020 import org.activemq.broker.BrokerContainer;
021
022 /**
023 * Represents a connector to one or more remote brokers.
024 * This class manages a number of {@link NetworkChannel} instances
025 * which may or may not be connected to a
026 * remote broker at any point in time.
027 * <p/>
028 * The implementation of this class could use a fixed number of
029 * configured {@link NetworkChannel} instances or could use
030 * discovery to find them.
031 *
032 * @version $Revision: 1.1.1.1 $
033 */
034 public class RemoteNetworkConnector extends NetworkConnector {
035
036
037 /**
038 * RemoteNetworkConnector
039 * @param brokerContainer
040 */
041 public RemoteNetworkConnector(BrokerContainer brokerContainer) {
042 super(brokerContainer);
043 }
044
045 /**
046 * Create a channel from the url
047 * @param url
048 * @return
049 */
050 protected NetworkChannel createNetworkChannel(String url) {
051 NetworkChannel answer = new RemoteNetworkChannel(this,getBrokerContainer(), url);
052 answer.setRemoteUserName(getRemoteUserName());
053 answer.setRemotePassword(getRemotePassword());
054 return answer;
055 }
056
057 }