Qpid Proton C++  0.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Types | Public Member Functions | Static Public Attributes | List of all members
connection Class Reference

A connection to a remote AMQP peer. More...

#include <connection.hpp>

Inheritance diagram for connection:
endpoint

Public Types

typedef int state
 A bit mask of state bit values. More...
 

Public Member Functions

endpoint::state state () const
 Get the state of this connection.
 
condition local_condition () const
 Get the local error condition.
 
condition remote_condition () const
 Get the error condition of the remote endpoint.
 
class container & container () const
 Get the container. More...
 
class transport transport () const
 Get the transport for the connection.
 
std::string host () const
 Return the AMQP host name for the connection.
 
std::string container_id () const
 Return the container ID for the connection.
 
void close ()
 Initiate local close. More...
 
session open_session ()
 Open a new session.
 
session default_session ()
 Get the default session. More...
 
sender open_sender (const std::string &addr, const link_options &opts=link_options())
 Open a sender for addr on default_session().
 
receiver open_receiver (const std::string &addr, const link_options &opts=link_options())
 Open a receiver for addr on default_session().
 
link_range find_links (endpoint::state mask) const
 Return links on this connection matching the state mask.
 
session_range find_sessions (endpoint::state mask) const
 Return sessions on this connection matching the state mask.
 

Static Public Attributes

static const state LOCAL_UNINIT
 Local endpoint is uninitialized.
 
static const state REMOTE_UNINIT
 Remote endpoint is uninitialized.
 
static const state LOCAL_ACTIVE
 Local endpoint is active.
 
static const state REMOTE_ACTIVE
 Remote endpoint is active.
 
static const state LOCAL_CLOSED
 Local endpoint has been closed.
 
static const state REMOTE_CLOSED
 Remote endpoint has been closed.
 
static const state LOCAL_MASK
 Mask including all LOCAL_ bits (UNINIT, ACTIVE, CLOSED)
 
static const state REMOTE_MASK
 Mask including all REMOTE_ bits (UNINIT, ACTIVE, CLOSED)
 

Detailed Description

A connection to a remote AMQP peer.

Examples:
broker.hpp, helloworld.cpp, and server.cpp.

Member Typedef Documentation

typedef int state
inherited

A bit mask of state bit values.

A state mask is matched against an endpoint as follows: If the state mask contains both local and remote flags, then an exact match against those flags is performed. If state contains only local or only remote flags, then a match occurs if any of the local or remote flags are set respectively.

See Also
connection::find_links, connection::find_sessions

Member Function Documentation

void close ( )
class container& container ( ) const

Get the container.

Exceptions
proton::errorif this connection is not managed by a container
session default_session ( )

Get the default session.

A default session is created on the first call and reused for the lifetime of the connection.


The documentation for this class was generated from the following file: