diff options
| author | Alan Conway <aconway@apache.org> | 2009-02-12 19:01:51 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2009-02-12 19:01:51 +0000 |
| commit | bffd507d565f4030407dc3d998f0e7ead2b39aa7 (patch) | |
| tree | 2b2ee44392365ad6253d8d4cabbe6eaf2d80ab0b /cpp/src/qpid/cluster/ClusterSettings.h | |
| parent | d066e62f23cf2019ca608116e5d2a61a8b36c281 (diff) | |
| download | qpid-python-bffd507d565f4030407dc3d998f0e7ead2b39aa7.tar.gz | |
Cluster security support:
- Set correct user ID on update connections.
- Allow configuration of user, pass and mechanism used for update connections.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@743839 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/ClusterSettings.h')
| -rw-r--r-- | cpp/src/qpid/cluster/ClusterSettings.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/cpp/src/qpid/cluster/ClusterSettings.h b/cpp/src/qpid/cluster/ClusterSettings.h new file mode 100644 index 0000000000..a8f33be75e --- /dev/null +++ b/cpp/src/qpid/cluster/ClusterSettings.h @@ -0,0 +1,48 @@ +#ifndef QPID_CLUSTER_CLUSTERSETTINGS_H +#define QPID_CLUSTER_CLUSTERSETTINGS_H + +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + +#include <qpid/Url.h> +#include <string> + +namespace qpid { +namespace cluster { + +struct ClusterSettings { + std::string name; + std::string url; + bool quorum; + size_t readMax, writeEstimate; + std::string username, password, mechanism; + + ClusterSettings() : quorum(false), readMax(10), writeEstimate(64), username("guest"), password("guest") {} + + Url getUrl(uint16_t port) const { + if (url.empty()) return Url::getIpAddressesUrl(port); + return Url(url); + } +}; + +}} // namespace qpid::cluster + +#endif /*!QPID_CLUSTER_CLUSTERSETTINGS_H*/ |
