container.hpp
Go to the documentation of this file.
#ifndef PROTON_CONTAINER_HPP
#define PROTON_CONTAINER_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 "./returned.hpp"
#include "./types_fwd.hpp"
#include "./internal/config.hpp"
#include "./internal/export.hpp"
#include "./internal/pn_unique_ptr.hpp"
#include <string>
namespace proton {
class PN_CPP_CLASS_EXTERN container {
public:
PN_CPP_EXTERN container(messaging_handler& handler, const std::string& id);
PN_CPP_EXTERN container(messaging_handler& handler);
PN_CPP_EXTERN container(const std::string& id);
PN_CPP_EXTERN container();
PN_CPP_EXTERN ~container();
PN_CPP_EXTERN returned<connection> connect(const std::string& conn_url,
const connection_options& conn_opts);
PN_CPP_EXTERN returned<connection> connect(const std::string& conn_url);
PN_CPP_EXTERN listener listen(const std::string& listen_url,
listen_handler& handler);
PN_CPP_EXTERN listener listen(const std::string& listen_url,
const connection_options& conn_opts);
PN_CPP_EXTERN listener listen(const std::string& listen_url);
PN_CPP_EXTERN void run();
#if PN_CPP_SUPPORTS_THREADS
PN_CPP_EXTERN void run(int count);
#endif
PN_CPP_EXTERN void auto_stop(bool enabled);
PN_CPP_EXTERN void stop(const error_condition& err);
PN_CPP_EXTERN void stop();
PN_CPP_EXTERN returned<sender> open_sender(const std::string& addr_url);
PN_CPP_EXTERN returned<sender> open_sender(const std::string& addr_url,
const proton::sender_options& snd_opts);
PN_CPP_EXTERN returned<sender> open_sender(const std::string& addr_url,
const connection_options& conn_opts);
PN_CPP_EXTERN returned<sender> open_sender(const std::string& addr_url,
const proton::sender_options& snd_opts,
const connection_options& conn_opts);
PN_CPP_EXTERN returned<receiver> open_receiver(const std::string& addr_url);
PN_CPP_EXTERN returned<receiver> open_receiver(const std::string& addr_url,
const proton::receiver_options& rcv_opts);
PN_CPP_EXTERN returned<receiver> open_receiver(const std::string& addr_url,
const connection_options& conn_opts);
PN_CPP_EXTERN returned<receiver> open_receiver(const std::string& addr_url,
const proton::receiver_options& rcv_opts,
const connection_options& conn_opts);
PN_CPP_EXTERN std::string id() const;
PN_CPP_EXTERN void client_connection_options(const connection_options& conn_opts);
PN_CPP_EXTERN connection_options client_connection_options() const;
PN_CPP_EXTERN void server_connection_options(const connection_options& conn_opts);
PN_CPP_EXTERN connection_options server_connection_options() const;
PN_CPP_EXTERN void sender_options(const class sender_options& snd_opts);
PN_CPP_EXTERN class sender_options sender_options() const;
PN_CPP_EXTERN void receiver_options(const class receiver_options& rcv_opts);
PN_CPP_EXTERN class receiver_options receiver_options() const;
PN_CPP_EXTERN void schedule(duration dur, work fn);
PN_CPP_EXTERN PN_CPP_DEPRECATED("Use 'container::schedule(duration, work)'") void schedule(duration dur, void_function0& fn);
// This is a hack to ensure that the C++03 version is declared
// only during the compilation of the library
#if PN_CPP_HAS_LAMBDAS && PN_CPP_HAS_VARIADIC_TEMPLATES && defined(qpid_proton_cpp_EXPORTS)
PN_CPP_EXTERN void schedule(duration dur, internal::v03::work fn);
#endif
private:
class impl;
internal::pn_unique_ptr<impl> impl_;
friend class connection_options;
friend class session_options;
friend class receiver_options;
friend class sender_options;
friend class work_queue;
};
} // proton
#endif // PROTON_CONTAINER_HPP
proton::error_condition
Describes an endpoint error state.
Definition: error_condition.hpp:40
proton::listener
A listener for incoming connections.
Definition: listener.hpp:33
proton::container
A top-level container of connections, sessions, and links.
Definition: container.hpp:50
fwd.hpp
proton::receiver_options
Options for creating a receiver.
Definition: receiver_options.hpp:56
proton::connection_options
Options for creating a connection.
Definition: connection_options.hpp:66
proton::duration
A span of time in milliseconds.
Definition: duration.hpp:39
proton::sender_options
Options for creating a sender.
Definition: sender_options.hpp:57
proton::messaging_handler
A handler for Proton messaging events.
Definition: messaging_handler.hpp:62
proton::session_options
Options for creating a session.
Definition: session_options.hpp:40
proton::returned
A return type for container methods.
Definition: fwd.hpp:79
proton::listen_handler
Unsettled API - A handler for incoming connections.
Definition: listen_handler.hpp:39
proton
The main Proton namespace.
Definition: annotation_key.hpp:33
returned.hpp
proton::work_queue
Unsettled API - A context for thread-safe execution of work.
Definition: work_queue.hpp:339
types_fwd.hpp