Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET | Apache Qpid Documentation |
#include <ConnectionHandler.h>
Inherits qpid::client::StateManager, qpid::client::ConnectionSettings, qpid::client::ChainableFrameHandler, qpid::framing::InputHandler, and qpid::framing::AMQP_ClientOperations::ConnectionHandler.
Public Types | |
typedef boost::function< void()> | CloseListener |
typedef boost::function< void(uint16_t, const std::string &)> | ErrorListener |
typedef boost::function< void(framing::AMQFrame &)> | FrameDelegate |
typedef T | HandledType |
typedef void | handleFptr (T) |
typedef void | result_type |
Public Member Functions | |
ConnectionHandler (const ConnectionSettings &, framing::ProtocolVersion &) | |
void | received (framing::AMQFrame &f) |
void | incoming (framing::AMQFrame &frame) |
void | outgoing (framing::AMQFrame &frame) |
void | waitForOpen () |
void | close () |
void | fail (const std::string &message) |
bool | isOpen () const |
bool | isClosed () const |
bool | isClosing () const |
std::auto_ptr< qpid::sys::SecurityLayer > | getSecurityLayer () |
void | setRcvTimeoutTask (boost::intrusive_ptr< qpid::sys::TimerTask >) |
virtual void | configureSocket (qpid::sys::Socket &) const |
Allows socket to be configured; default only sets tcp-nodelay based on the flag set. | |
void | handle (AMQFrame &f) |
virtual void | handle (T)=0 |
void | operator() (T t) |
Allow functor syntax for calling handle. | |
Static Public Member Functions | |
static framing::connection::CloseCode | convert (uint16_t replyCode) |
Public Attributes | |
CloseListener | onClose |
ErrorListener | onError |
std::vector< Url > | knownBrokersUrls |
std::string | protocol |
The protocol used for the connection (defaults to 'tcp'). | |
std::string | host |
The host (or ip address) to connect to (defaults to 'localhost'). | |
uint16_t | port |
The port to connect to (defaults to 5672). | |
std::string | virtualhost |
Allows an AMQP 'virtual host' to be specified for the connection. | |
std::string | username |
The username to use when authenticating the connection. | |
std::string | password |
The password to use when authenticating the connection. | |
std::string | mechanism |
The SASL mechanism to use when authenticating the connection; the options are currently PLAIN or ANONYMOUS. | |
std::string | locale |
Allows a locale to be specified for the connection. | |
uint16_t | heartbeat |
Allows a heartbeat frequency to be specified. | |
uint16_t | maxChannels |
The maximum number of channels that the client will request for use on this connection. | |
uint16_t | maxFrameSize |
The maximum frame size that the client will request for this connection. | |
uint | bounds |
Limit the size of the connections send buffer . | |
bool | tcpNoDelay |
If true, TCP_NODELAY will be set for the connection. | |
std::string | service |
SASL service name. | |
uint | minSsf |
Minimum acceptable strength of any SASL negotiated security layer. | |
uint | maxSsf |
Maximum acceptable strength of any SASL negotiated security layer. | |
FrameDelegate | in |
FrameDelegate | out |
Handler< T > * | next |
Pointer to next handler in a linked list. | |
Classes | |
class | Adapter |
Definition at line 45 of file ConnectionHandler.h.
typedef boost::function<void()> qpid::client::ConnectionHandler::CloseListener |
Definition at line 95 of file ConnectionHandler.h.
typedef boost::function<void(uint16_t, const std::string&)> qpid::client::ConnectionHandler::ErrorListener |
Definition at line 96 of file ConnectionHandler.h.
typedef boost::function<void(framing::AMQFrame&)> qpid::client::ChainableFrameHandler::FrameDelegate [inherited] |
Definition at line 33 of file ChainableFrameHandler.h.
typedef T qpid::framing::Handler< T >::HandledType [inherited] |
typedef void qpid::framing::Handler< T >::handleFptr(T) [inherited] |
typedef void qpid::framing::Handler< T >::result_type [inherited] |
qpid::client::ConnectionHandler::ConnectionHandler | ( | const ConnectionSettings & | , | |
framing::ProtocolVersion & | ||||
) |
void qpid::client::ConnectionHandler::close | ( | ) |
virtual void qpid::client::ConnectionSettings::configureSocket | ( | qpid::sys::Socket & | ) | const [virtual, inherited] |
Allows socket to be configured; default only sets tcp-nodelay based on the flag set.
Can be overridden.
static framing::connection::CloseCode qpid::client::ConnectionHandler::convert | ( | uint16_t | replyCode | ) | [static] |
void qpid::client::ConnectionHandler::fail | ( | const std::string & | message | ) |
std::auto_ptr<qpid::sys::SecurityLayer> qpid::client::ConnectionHandler::getSecurityLayer | ( | ) |
virtual void qpid::framing::Handler< T >::handle | ( | T | ) | [pure virtual, inherited] |
Implemented in qpid::client::ConnectionImpl, qpid::framing::Handler< T >::Functor< F >, qpid::framing::Handler< T >::MemFunRef< X, F >, qpid::framing::Handler< T >::MemFunRef< qpid::framing::Handler::InOutHandlerInterface,&InOutHandlerInterface::handleOut >, and qpid::framing::Handler< T >::MemFunRef< qpid::framing::Handler::InOutHandlerInterface,&InOutHandlerInterface::handleIn >.
Referenced by qpid::framing::Handler< AMQFrame & >::operator()(), and qpid::framing::Relay::operator()().
void qpid::framing::InputHandler::handle | ( | AMQFrame & | f | ) | [inline, inherited] |
void qpid::client::ConnectionHandler::incoming | ( | framing::AMQFrame & | frame | ) |
Referenced by received().
bool qpid::client::ConnectionHandler::isClosed | ( | ) | const |
bool qpid::client::ConnectionHandler::isClosing | ( | ) | const |
bool qpid::client::ConnectionHandler::isOpen | ( | ) | const |
void qpid::framing::Handler< T >::operator() | ( | T | t | ) | [inline, inherited] |
void qpid::client::ConnectionHandler::outgoing | ( | framing::AMQFrame & | frame | ) |
void qpid::client::ConnectionHandler::received | ( | framing::AMQFrame & | f | ) | [inline, virtual] |
Implements qpid::framing::InputHandler.
Definition at line 100 of file ConnectionHandler.h.
References incoming().
void qpid::client::ConnectionHandler::setRcvTimeoutTask | ( | boost::intrusive_ptr< qpid::sys::TimerTask > | ) |
void qpid::client::ConnectionHandler::waitForOpen | ( | ) |
uint qpid::client::ConnectionSettings::bounds [inherited] |
Limit the size of the connections send buffer .
The buffer is limited to bounds * maxFrameSize.
Definition at line 109 of file ConnectionSettings.h.
uint16_t qpid::client::ConnectionSettings::heartbeat [inherited] |
std::string qpid::client::ConnectionSettings::host [inherited] |
The host (or ip address) to connect to (defaults to 'localhost').
Definition at line 62 of file ConnectionSettings.h.
FrameDelegate qpid::client::ChainableFrameHandler::in [inherited] |
Definition at line 35 of file ChainableFrameHandler.h.
std::vector<Url> qpid::client::ConnectionHandler::knownBrokersUrls |
Definition at line 120 of file ConnectionHandler.h.
std::string qpid::client::ConnectionSettings::locale [inherited] |
Allows a locale to be specified for the connection.
Definition at line 90 of file ConnectionSettings.h.
uint16_t qpid::client::ConnectionSettings::maxChannels [inherited] |
The maximum number of channels that the client will request for use on this connection.
Definition at line 99 of file ConnectionSettings.h.
uint16_t qpid::client::ConnectionSettings::maxFrameSize [inherited] |
The maximum frame size that the client will request for this connection.
Definition at line 104 of file ConnectionSettings.h.
uint qpid::client::ConnectionSettings::maxSsf [inherited] |
Maximum acceptable strength of any SASL negotiated security layer.
0 means no security layer allowed.
Definition at line 127 of file ConnectionSettings.h.
std::string qpid::client::ConnectionSettings::mechanism [inherited] |
The SASL mechanism to use when authenticating the connection; the options are currently PLAIN or ANONYMOUS.
Definition at line 86 of file ConnectionSettings.h.
uint qpid::client::ConnectionSettings::minSsf [inherited] |
Minimum acceptable strength of any SASL negotiated security layer.
0 means no security layer required.
Definition at line 122 of file ConnectionSettings.h.
Handler<T>* qpid::framing::Handler< T >::next [inherited] |
Pointer to next handler in a linked list.
Definition at line 46 of file Handler.h.
Referenced by qpid::framing::ChannelHandler::handle().
Definition at line 117 of file ConnectionHandler.h.
Definition at line 118 of file ConnectionHandler.h.
Definition at line 36 of file ChainableFrameHandler.h.
std::string qpid::client::ConnectionSettings::password [inherited] |
The password to use when authenticating the connection.
Definition at line 81 of file ConnectionSettings.h.
uint16_t qpid::client::ConnectionSettings::port [inherited] |
std::string qpid::client::ConnectionSettings::protocol [inherited] |
The protocol used for the connection (defaults to 'tcp').
Definition at line 57 of file ConnectionSettings.h.
std::string qpid::client::ConnectionSettings::service [inherited] |
bool qpid::client::ConnectionSettings::tcpNoDelay [inherited] |
If true, TCP_NODELAY will be set for the connection.
Definition at line 113 of file ConnectionSettings.h.
std::string qpid::client::ConnectionSettings::username [inherited] |
The username to use when authenticating the connection.
If not specified the current users login is used if available.
Definition at line 77 of file ConnectionSettings.h.
std::string qpid::client::ConnectionSettings::virtualhost [inherited] |
Allows an AMQP 'virtual host' to be specified for the connection.
Definition at line 71 of file ConnectionSettings.h.