001 /*
002 *
003 * Licensed to the Apache Software Foundation (ASF) under one
004 * or more contributor license agreements. See the NOTICE file
005 * distributed with this work for additional information
006 * regarding copyright ownership. The ASF licenses this file
007 * to you under the Apache License, Version 2.0 (the
008 * "License"); you may not use this file except in compliance
009 * with the License. You may obtain a copy of the License at
010 *
011 * http://www.apache.org/licenses/LICENSE-2.0
012 *
013 * Unless required by applicable law or agreed to in writing,
014 * software distributed under the License is distributed on an
015 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
016 * KIND, either express or implied. See the License for the
017 * specific language governing permissions and limitations
018 * under the License.
019 *
020 */
021 package org.apache.qpid.server.configuration;
022
023 import java.util.List;
024
025 import org.apache.commons.configuration.Configuration;
026
027 public class QueueConfiguration
028 {
029
030 // FIXME AIDAN XXX -- deal with defaults
031
032 private Configuration _config;
033 private String _name;
034
035 public QueueConfiguration(String name, Configuration config)
036 {
037 _config = config;
038 _name = name;
039 }
040
041 public boolean getDurable()
042 {
043 return _config.getBoolean("durable" ,false);
044 }
045
046 public boolean getAutoDelete()
047 {
048 return _config.getBoolean("autodelete", false);
049 }
050
051 public String getOwner()
052 {
053 return _config.getString("owner", null);
054 }
055
056 public boolean getPriority()
057 {
058 return _config.getBoolean("priority", false);
059 }
060
061 public int getPriorities()
062 {
063 return _config.getInt("priorities", -1);
064 }
065
066 public String getExchange()
067 {
068 return _config.getString("exchange", null);
069 }
070
071 public List getRoutingKeys()
072 {
073 return _config.getList("routingKey");
074 }
075
076 public String getName()
077 {
078 return _name;
079 }
080
081 public long getMaximumMessageAge()
082 {
083 return _config.getLong("maximumMessageAge", 0);
084 }
085
086 public long getMaximumQueueDepth()
087 {
088 return _config.getLong("maximumQueueDepth", 0);
089 }
090
091 public long getMaximumMessageSize()
092 {
093 return _config.getLong("maximumMessageSize", 0);
094 }
095
096 public long getMaximumMessageCount()
097 {
098 return _config.getLong("maximumMessageCount", 0);
099 }
100
101 public long getMinimumAlertRepeatGap()
102 {
103 return _config.getLong("minimumAlertRepeatGap", 0);
104 }
105
106 }
|