Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
ConnectionSettings.h
Go to the documentation of this file.
1 #ifndef _QmfEngineConnectionSettings_
2 #define _QmfEngineConnectionSettings_
3 
4 /*
5  * Licensed to the Apache Software Foundation (ASF) under one
6  * or more contributor license agreements. See the NOTICE file
7  * distributed with this work for additional information
8  * regarding copyright ownership. The ASF licenses this file
9  * to you under the Apache License, Version 2.0 (the
10  * "License"); you may not use this file except in compliance
11  * with the License. You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing,
16  * software distributed under the License is distributed on an
17  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18  * KIND, either express or implied. See the License for the
19  * specific language governing permissions and limitations
20  * under the License.
21  */
22 
24 #include "qpid/sys/IntegerTypes.h"
25 
26 namespace qmf {
27 namespace engine {
28 
29  class ConnectionSettingsImpl;
30  class Value;
31 
38  public:
39 
49 
63  QMFE_EXTERN ConnectionSettings(const char* url);
64 
68  ConnectionSettings(const ConnectionSettings& from);
69 
74 
85  QMFE_EXTERN bool setAttr(const char* key, const Value& value);
86 
94  QMFE_EXTERN Value getAttr(const char* key) const;
95 
103  QMFE_EXTERN const char* getAttrString() const;
104 
110  QMFE_EXTERN void transportTcp(uint16_t port = 5672);
111  QMFE_EXTERN void transportSsl(uint16_t port = 5671);
112  QMFE_EXTERN void transportRdma(uint16_t port = 5672);
113 
127  QMFE_EXTERN void authAnonymous(const char* username = 0);
128  QMFE_EXTERN void authPlain(const char* username = 0, const char* password = 0);
129  QMFE_EXTERN void authGssapi(const char* serviceName, uint32_t minSsf = 0, uint32_t maxSsf = 256);
130 
140  QMFE_EXTERN void setRetry(int delayMin = 1, int delayMax = 128, int delayFactor = 2);
141 
142  private:
144  ConnectionSettingsImpl* impl;
145  };
146 
147 }
148 }
149 
150 #endif
bool setAttr(const char *key, const Value &value)
Set an attribute to control connection setup.
~ConnectionSettings()
Destroy the connection settings object.
const char * getAttrString() const
Get the attribute string (the portion of the URL following the '?') for the settings.
void authGssapi(const char *serviceName, uint32_t minSsf=0, uint32_t maxSsf=256)
void authPlain(const char *username=0, const char *password=0)
void transportSsl(uint16_t port=5671)
void transportRdma(uint16_t port=5672)
ConnectionSettings()
Create a set of default connection settings.
#define QMFE_EXTERN
unsigned int uint32_t
Definition: IntegerTypes.h:27
void authAnonymous(const char *username=0)
Shortcuts for setting authentication mechanisms.
void setRetry(int delayMin=1, int delayMax=128, int delayFactor=2)
Shortcut for setting connection retry attributes.
unsigned short uint16_t
Definition: IntegerTypes.h:25
Settings for AMQP connections to the broker.
Value getAttr(const char *key) const
Get the value of an attribute.
void transportTcp(uint16_t port=5672)
Shortcuts for setting the transport for the connection.

Qpid C++ API Reference
Generated on Mon Sep 22 2014 for Qpid C++ Client API by doxygen 1.8.7