Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes
qpid::client::FlowControl Struct Reference

Flow control works by associating a finite amount of "credit" with a subscription. More...

#include <qpid/client/FlowControl.h>

List of all members.

Public Member Functions

 FlowControl (uint32_t messages_=0, uint32_t bytes_=0, bool window_=false)
bool operator== (const FlowControl &x)

Static Public Member Functions

static FlowControl messageCredit (uint32_t messages_)
static FlowControl messageWindow (uint32_t messages_)
static FlowControl byteCredit (uint32_t bytes_)
static FlowControl byteWindow (uint32_t bytes_)
static FlowControl unlimited ()
static FlowControl zero ()

Public Attributes

uint32_t messages
 Message credit: subscription can accept up to this many messages.
uint32_t bytes
 Byte credit: subscription can accept up to this many bytes of message content.
bool window
 Window mode.

Static Public Attributes

static const uint32_t UNLIMITED = 0xFFFFFFFF

Detailed Description

Flow control works by associating a finite amount of "credit" with a subscription.

Credit includes a message count and a byte count. Each message received decreases the message count by one, and the byte count by the size of the message. Either count can have the special value UNLIMITED which is never decreased.

A subscription's credit is exhausted when the message count is 0 or the byte count is too small for the next available message. The subscription will not receive any further messages until is credit is renewed.

In "window mode" credit is automatically renewed when a message is completed (which by default happens when it is accepted). In non-window mode credit is not automatically renewed, it must be explicitly re-set (

See also:
Subscription)

Definition at line 49 of file FlowControl.h.


Constructor & Destructor Documentation

qpid::client::FlowControl::FlowControl ( uint32_t  messages_ = 0,
uint32_t  bytes_ = 0,
bool  window_ = false 
) [inline]

Definition at line 51 of file FlowControl.h.

Referenced by byteCredit(), byteWindow(), messageCredit(), messageWindow(), unlimited(), and zero().


Member Function Documentation

static FlowControl qpid::client::FlowControl::byteCredit ( uint32_t  bytes_) [inline, static]

Definition at line 56 of file FlowControl.h.

References FlowControl(), and UNLIMITED.

static FlowControl qpid::client::FlowControl::byteWindow ( uint32_t  bytes_) [inline, static]

Definition at line 57 of file FlowControl.h.

References FlowControl(), and UNLIMITED.

static FlowControl qpid::client::FlowControl::messageCredit ( uint32_t  messages_) [inline, static]

Definition at line 54 of file FlowControl.h.

References FlowControl(), and UNLIMITED.

static FlowControl qpid::client::FlowControl::messageWindow ( uint32_t  messages_) [inline, static]

Definition at line 55 of file FlowControl.h.

References FlowControl(), and UNLIMITED.

bool qpid::client::FlowControl::operator== ( const FlowControl x) [inline]

Definition at line 68 of file FlowControl.h.

References bytes, messages, and window.

static FlowControl qpid::client::FlowControl::unlimited ( ) [inline, static]

Definition at line 58 of file FlowControl.h.

References FlowControl(), and UNLIMITED.

static FlowControl qpid::client::FlowControl::zero ( ) [inline, static]

Definition at line 59 of file FlowControl.h.

References FlowControl().


Member Data Documentation

Byte credit: subscription can accept up to this many bytes of message content.

Definition at line 64 of file FlowControl.h.

Referenced by operator==().

Message credit: subscription can accept up to this many messages.

Definition at line 62 of file FlowControl.h.

Referenced by operator==().

const uint32_t qpid::client::FlowControl::UNLIMITED = 0xFFFFFFFF [static]

Definition at line 50 of file FlowControl.h.

Referenced by byteCredit(), byteWindow(), messageCredit(), messageWindow(), and unlimited().

Window mode.

If true credit is automatically renewed as messages are acknowledged.

Definition at line 66 of file FlowControl.h.

Referenced by operator==().


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

Qpid C++ API Reference
Generated on Mon Aug 22 2011 for Qpid C++ Client API by doxygen 1.7.4