1 #ifndef PROTON_CPP_CONNECTION_H
2 #define PROTON_CPP_CONNECTION_H
25 #include "proton/export.hpp"
26 #include "proton/endpoint.hpp"
27 #include "proton/link.hpp"
28 #include "proton/object.hpp"
29 #include "proton/session.hpp"
30 #include "proton/connection_options.hpp"
31 #include "proton/types.h"
34 struct pn_connection_t;
45 connection(pn_connection_t* c=0) : object<pn_connection_t>(c) {}
61 PN_CPP_EXTERN
class transport transport() const;
64 PN_CPP_EXTERN std::string
host()
const;
69 PN_CPP_EXTERN
void host(
const std::string& h);
79 PN_CPP_EXTERN
void open();
84 PN_CPP_EXTERN
void close();
89 PN_CPP_EXTERN
void release();
124 PN_CPP_EXTERN
void user(
const std::string &);
125 PN_CPP_EXTERN
void password(
const std::string &);
128 friend class connection_context;
131 friend class connector;
132 friend class transport;
133 friend class container_impl;
139 #endif // PROTON_CPP_CONNECTION_H
A top-level container of connections, sessions, and links.
Definition: container.hpp:57
sender open_sender(const std::string &addr, const link_options &opts=link_options())
Open a sender for addr on default_session().
std::string host() const
Return the AMQP host name for the connection.
session_range find_sessions(endpoint::state mask) const
Return sessions on this connection matching the state mask.
An interface for connection-oriented IO integration.
Definition: connection_engine.hpp:64
A link for sending messages.
Definition: sender.hpp:38
std::string container_id() const
Return the container ID for the connection.
void close()
Initiate local close.
link_range find_links(endpoint::state mask) const
Return links on this connection matching the state mask.
class container & container() const
Get the container.
A connection to a remote AMQP peer.
Definition: connection.hpp:42
Options for creating a connection.
Definition: connection_options.hpp:60
The base class for session, connection, and link.
Definition: endpoint.hpp:32
A container of links.
Definition: session.hpp:42
Describes an endpoint error state.
Definition: condition.hpp:35
session default_session()
Get the default session.
int state
A bit mask of state bit values.
Definition: endpoint.hpp:45
static const state LOCAL_CLOSED
Local endpoint has been closed.
Definition: endpoint.hpp:51
condition remote_condition() const
Get the error condition of the remote endpoint.
condition local_condition() const
Get the local error condition.
Options for creating a link.
Definition: link_options.hpp:60
session open_session()
Open a new session.
A link for receiving messages.
Definition: receiver.hpp:36
static const state REMOTE_CLOSED
Remote endpoint has been closed.
Definition: endpoint.hpp:52
A network layer supporting an AMQP connection.
Definition: transport.hpp:38
endpoint::state state() const
Get the state of this connection.
receiver open_receiver(const std::string &addr, const link_options &opts=link_options())
Open a receiver for addr on default_session().