001 /**
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements. See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License. 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 package org.apache.activemq.network.jms;
018
019 /**
020 * Create an Outbound Queue Bridge. By default the bridge uses the same
021 * name for both the inbound and outbound queues, however this can be altered
022 * by using the public setter methods to configure both inbound and outbound
023 * queue names.
024 *
025 * @org.apache.xbean.XBean
026 */
027 public class OutboundQueueBridge extends QueueBridge {
028
029 String outboundQueueName;
030 String localQueueName;
031
032 /**
033 * Constructor that takes a foreign destination as an argument
034 *
035 * @param outboundQueueName
036 */
037 public OutboundQueueBridge(String outboundQueueName) {
038 this.outboundQueueName = outboundQueueName;
039 this.localQueueName = outboundQueueName;
040 }
041
042 /**
043 * Default Constructor
044 */
045 public OutboundQueueBridge() {
046 }
047
048 /**
049 * @return Returns the outboundQueueName.
050 */
051 public String getOutboundQueueName() {
052 return outboundQueueName;
053 }
054
055 /**
056 * Sets the name of the outbound queue name. If the inbound queue name
057 * has not been set already then this method uses the provided queue name
058 * to set the inbound topic name as well.
059 *
060 * @param outboundQueueName The outboundQueueName to set.
061 */
062 public void setOutboundQueueName(String outboundQueueName) {
063 this.outboundQueueName = outboundQueueName;
064 if (this.localQueueName == null) {
065 this.localQueueName = outboundQueueName;
066 }
067 }
068
069 /**
070 * @return the localQueueName
071 */
072 public String getLocalQueueName() {
073 return localQueueName;
074 }
075
076 /**
077 * @param localQueueName the localQueueName to set
078 */
079 public void setLocalQueueName(String localQueueName) {
080 this.localQueueName = localQueueName;
081 }
082 }