Qpid Proton C++ API 0.41.1
Loading...
Searching...
No Matches
session

A container of senders and receivers. More...

#include <session.hpp>

Inheritance diagram for session:
endpoint

Public Member Functions

 session ()
 Create an empty session.
bool uninitialized () const
 True if the local end is uninitialized.
bool active () const
 True if the local end is active.
bool closed () const
 True if the local and remote ends are closed.
class error_condition error () const
 Get the error condition of the remote endpoint.
void open ()
 Open the session.
void open (const session_options &opts)
 Open the session.
void close ()
 Close the endpoint.
void close (const error_condition &)
 Close the endpoint with an error condition.
class container & container () const
 Get the container for this session.
class work_queue & work_queue () const
 Get the work_queue for the session.
class connection connection () const
 Get the connection this session belongs to.
sender open_sender (const std::string &addr)
 Open a sender for addr.
sender open_sender (const std::string &addr, const sender_options &opts)
 Open a sender for addr.
receiver open_receiver (const std::string &addr)
 Open a receiver for addr.
receiver open_receiver (const std::string &addr, const receiver_options &opts)
 Open a receiver for addr.
size_t incoming_bytes () const
 The number of incoming bytes currently buffered.
size_t outgoing_bytes () const
 The number of outgoing bytes currently buffered.
sender_range senders () const
 Return the senders on this session.
receiver_range receivers () const
 Return the receivers on this session.
void user_data (void *user_data) const
 Set user data on this session.
void * user_data () const
 Get user data from this session.
void transaction_declare ()
 Unsettled API - Declare a new local transaction on this session.
void transaction_declare (const transaction_options &opts)
 Unsettled API - Declare a new local transaction on this session.
void transaction_commit ()
 Unsettled API - Commit the currently declared transaction.
void transaction_abort ()
 Unsettled API - Abort the currently declared transaction.
bool transaction_is_declared () const
 Unsettled API - Return true if a transaction is currently declared.
binary transaction_id () const
 Unsettled API - Return the identifier of the current transaction.
error_condition transaction_error () const
 Unsettled API - Return the error condition associated with transaction.

Detailed Description

A container of senders and receivers.

Member Function Documentation

◆ uninitialized()

bool uninitialized ( ) const
virtual

True if the local end is uninitialized.

Implements endpoint.

◆ active()

bool active ( ) const
virtual

True if the local end is active.

Implements endpoint.

◆ closed()

bool closed ( ) const
virtual

True if the local and remote ends are closed.

Implements endpoint.

◆ error()

class error_condition error ( ) const
virtual

Get the error condition of the remote endpoint.

Implements endpoint.

◆ open()

void open ( const session_options & opts)

Open the session.

◆ close() [1/2]

void close ( )
virtual

Close the endpoint.

Implements endpoint.

◆ close() [2/2]

void close ( const error_condition & )
virtual

Close the endpoint with an error condition.

Implements endpoint.

◆ open_sender()

sender open_sender ( const std::string & addr,
const sender_options & opts )

Open a sender for addr.

◆ open_receiver()

receiver open_receiver ( const std::string & addr,
const receiver_options & opts )

Open a receiver for addr.

◆ transaction_declare() [1/2]

void transaction_declare ( )

Unsettled API - Declare a new local transaction on this session.

When the transactions coordinator accepts, the application receives messaging_handler::on_session_transaction_declared. A rejected declare is reported as messaging_handler::on_session_transaction_error.

See also
transactions_page

◆ transaction_declare() [2/2]

void transaction_declare ( const transaction_options & opts)

Unsettled API - Declare a new local transaction on this session.

When the transactions coordinator accepts, the application receives messaging_handler::on_session_transaction_declared. A rejected declare is reported as messaging_handler::on_session_transaction_error.

See also
transactions_page Unsettled API - Declare using transaction options (see proton::transaction_options).

◆ transaction_commit()

void transaction_commit ( )

Unsettled API - Commit the currently declared transaction.

Outcome is delivered asynchronously via messaging_handler::on_session_transaction_committed or messaging_handler::on_session_transaction_aborted.

◆ transaction_abort()

void transaction_abort ( )

Unsettled API - Abort the currently declared transaction.

This completes with messaging_handler::on_session_transaction_aborted (see also transaction_commit()).

◆ transaction_id()

binary transaction_id ( ) const

Unsettled API - Return the identifier of the current transaction.

There will be a valid transaction id from the tranacrtion declared callback until after any transaction dicharge callback.


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