connection.hpp
Go to the documentation of this file.
#ifndef PROTON_CONNECTION_HPP
#define PROTON_CONNECTION_HPP
/*
*
* 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 "./fwd.hpp"
#include "./internal/export.hpp"
#include "./internal/object.hpp"
#include "./endpoint.hpp"
#include "./session.hpp"
#include <proton/type_compat.h>
#include <string>
struct pn_connection_t;
namespace proton {
class
PN_CPP_CLASS_EXTERN connection : public internal::object<pn_connection_t>, public endpoint {
PN_CPP_EXTERN connection(pn_connection_t* c) : internal::object<pn_connection_t>(c) {}
public:
connection() : internal::object<pn_connection_t>(0) {}
PN_CPP_EXTERN bool uninitialized() const;
PN_CPP_EXTERN bool active() const;
PN_CPP_EXTERN bool closed() const;
PN_CPP_EXTERN class error_condition error() const;
PN_CPP_EXTERN class container& container() const;
PN_CPP_EXTERN class work_queue& work_queue() const;
PN_CPP_EXTERN class transport transport() const;
PN_CPP_EXTERN std::string virtual_host() const;
PN_CPP_EXTERN std::string container_id() const;
PN_CPP_EXTERN std::string user() const;
PN_CPP_EXTERN void open();
PN_CPP_EXTERN void open(const connection_options&);
PN_CPP_EXTERN void close();
PN_CPP_EXTERN void close(const error_condition&);
PN_CPP_EXTERN session open_session();
PN_CPP_EXTERN session open_session(const session_options&);
PN_CPP_EXTERN session default_session();
PN_CPP_EXTERN sender open_sender(const std::string& addr);
PN_CPP_EXTERN sender open_sender(const std::string& addr, const sender_options&);
PN_CPP_EXTERN receiver open_receiver(const std::string& addr);
PN_CPP_EXTERN receiver open_receiver(const std::string& addr,
const receiver_options&);
PN_CPP_EXTERN class sender_options sender_options() const;
PN_CPP_EXTERN class receiver_options receiver_options() const;
PN_CPP_EXTERN session_range sessions() const;
PN_CPP_EXTERN receiver_range receivers() const;
PN_CPP_EXTERN sender_range senders() const;
PN_CPP_EXTERN uint32_t max_frame_size() const;
PN_CPP_EXTERN uint16_t max_sessions() const;
PN_CPP_EXTERN uint32_t idle_timeout() const;
PN_CPP_EXTERN void wake() const;
friend class internal::factory<connection>;
friend class container;
};
} // proton
#endif // PROTON_CONNECTION_HPP
proton::error_condition
Describes an endpoint error state.
Definition: error_condition.hpp:40
proton::connection::connection
connection()
Create an empty connection.
Definition: connection.hpp:51
session.hpp
proton::error
The base Proton error.
Definition: error.hpp:40
proton::container
A top-level container of connections, sessions, and links.
Definition: container.hpp:50
fwd.hpp
proton::endpoint
The base class for session, connection, and link.
Definition: endpoint.hpp:36
proton::receiver_options
Options for creating a receiver.
Definition: receiver_options.hpp:56
proton::connection
A connection to a remote AMQP peer.
Definition: connection.hpp:43
proton::receiver
A channel for receiving messages.
Definition: receiver.hpp:40
proton::connection_options
Options for creating a connection.
Definition: connection_options.hpp:66
endpoint.hpp
proton::sender_options
Options for creating a sender.
Definition: sender_options.hpp:57
proton::session_options
Options for creating a session.
Definition: session_options.hpp:40
proton::sender
A channel for sending messages.
Definition: sender.hpp:39
proton::transport
A network channel supporting an AMQP connection.
Definition: transport.hpp:37
proton
The main Proton namespace.
Definition: annotation_key.hpp:33
proton::session
A container of senders and receivers.
Definition: session.hpp:41
proton::work_queue
Unsettled API - A context for thread-safe execution of work.
Definition: work_queue.hpp:339