connection_options.hpp
#ifndef PROTON_CONNECTION_OPTIONS_H
#define PROTON_CONNECTION_OPTIONS_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 "./internal/config.hpp"
#include "./internal/export.hpp"
#include "./duration.hpp"
#include "./internal/pn_unique_ptr.hpp"
#include "./reconnect_timer.hpp"
#include "./types_fwd.hpp"
#include <vector>
#include <string>
struct pn_connection_t;
namespace proton {
class proton_handler;
class connection;
namespace io {
class connection_engine;
}
class connection_options {
public:
PN_CPP_EXTERN connection_options();
PN_CPP_EXTERN connection_options(class messaging_handler& h);
PN_CPP_EXTERN connection_options(const connection_options&);
PN_CPP_EXTERN ~connection_options();
PN_CPP_EXTERN connection_options& operator=(const connection_options&);
// XXX add C++11 move operations - Still relevant, and applies to all options
PN_CPP_EXTERN connection_options& handler(class messaging_handler&);
PN_CPP_EXTERN connection_options& max_frame_size(uint32_t max);
PN_CPP_EXTERN connection_options& max_sessions(uint16_t max);
// XXX document relationship to heartbeat interval
PN_CPP_EXTERN connection_options& idle_timeout(duration);
PN_CPP_EXTERN connection_options& container_id(const std::string &id);
PN_CPP_EXTERN connection_options& virtual_host(const std::string &name);
PN_CPP_EXTERN connection_options& user(const std::string& user);
PN_CPP_EXTERN connection_options& password(const std::string& pass);
// XXX settle questions about reconnect_timer - consider simply
// reconnect_options and making reconnect_timer internal
PN_CPP_EXTERN connection_options& reconnect(const reconnect_timer &);
PN_CPP_EXTERN connection_options& ssl_client_options(const class ssl_client_options &);
PN_CPP_EXTERN connection_options& ssl_server_options(const class ssl_server_options &);
PN_CPP_EXTERN connection_options& sasl_enabled(bool);
PN_CPP_EXTERN connection_options& sasl_allow_insecure_mechs(bool);
PN_CPP_EXTERN connection_options& sasl_allowed_mechs(const std::string &);
PN_CPP_EXTERN connection_options& sasl_config_name(const std::string &);
PN_CPP_EXTERN connection_options& sasl_config_path(const std::string &);
PN_CPP_EXTERN connection_options& update(const connection_options& other);
private:
void apply_unbound(connection&) const;
void apply_bound(connection&) const;
messaging_handler* handler() const;
class impl;
internal::pn_unique_ptr<impl> impl_;
friend class container_impl;
friend class connector;
friend class io::connection_engine;
friend class connection;
};
} // proton
#endif // PROTON_CONNECTION_OPTIONS_H
proton::ssl_server_options
Experimental - SSL configuration for inbound connections.
Definition: ssl.hpp:144
proton::duration
A span of time in milliseconds.
Definition: duration.hpp:34
proton::connection
A connection to a remote AMQP peer.
Definition: connection.hpp:48
proton::connection_options
Options for creating a connection.
Definition: connection_options.hpp:67
proton::ssl_client_options
Experimental - SSL configuration for outbound connections.
Definition: ssl.hpp:171
types_fwd.hpp
Forward declarations for all the C++ types used by Proton to represent AMQP types.
proton::io::connection_engine
Experimental - An AMQP protocol engine for a single connection.
Definition: connection_engine.hpp:98
proton::messaging_handler
A handler for Proton messaging events.
Definition: messaging_handler.hpp:74
proton
Type traits for mapping between AMQP and C++ types.
Definition: annotation_key.hpp:28