libmoost
moost::mq::stomp_client::impl Class Reference

#include <stomp_client_impl.h>

Collaboration diagram for moost::mq::stomp_client::impl:

List of all members.

Classes

struct  protocol
struct  state

Public Types

typedef boost::function< void(const
boost::system::error_code
&, const std::string &)> 
error_cb_t

Public Member Functions

 impl (size_t consumer_pool_size, const boost::posix_time::time_duration &keepalive_interval, const boost::posix_time::time_duration &reconnect_interval)
 ~impl ()
void connect (const std::string &hostname, int port, error_cb_t error_cb)
void disconnect ()
void subscribe (const std::string &topic, stream::message_cb_t message_cb, stomp_client::ack::type ack_type, const boost::posix_time::time_duration &max_msg_interval)
void unsubscribe (const std::string &topic)
void send (const std::string &topic, const std::string &message)
bool is_connected () const
bool is_online () const
uint64_t get_num_processed () const
size_t get_num_pending () const

Private Types

typedef std::map< std::string,
std::string > 
header_map

Private Member Functions

boost::system::error_code connect ()
void reconnect ()
void subscribe (const std::string &topic, stomp_client::ack::type ack_type)
boost::system::error_code send_to_queue (const std::string &command, const std::string &body=std::string())
boost::system::error_code send_to_queue (const std::string &command, const header_map &headers, const std::string &body=std::string())
void send_to_queue_async (const std::string &command, const std::string &body=std::string())
void send_to_queue_async (const std::string &command, const header_map &headers, const std::string &body=std::string())
void send_to_queue (const std::string &command, const header_map &headers, const std::string &body, boost::system::error_code *ec)
void receive_from_queue (std::string &command, header_map &headers, std::string &body)
void handle_keepalive (const boost::system::error_code &err)
void handle_recv (const boost::system::error_code &err)
void handle_reconnect (const boost::system::error_code &err)
void handle_write (boost::shared_ptr< boost::asio::streambuf >, const boost::system::error_code &err)
void handle_stomp_error (const header_map &headers, const std::string &body)
void handle_dead_conn (const boost::system::error_code &err)
void recv_more ()
void keepalive ()
void dead_conn_detect ()
void on_message (const header_map &headers, const std::string &msg)

Static Private Member Functions

static boost::system::error_code make_error_code (error::type ec)

Private Attributes

const
boost::posix_time::time_duration 
m_keepalive_interval
const
boost::posix_time::time_duration 
m_reconnect_interval
std::string m_hostname
int m_port
error_cb_t m_error_cb
boost::asio::io_service m_ios
boost::asio::ip::tcp::socket m_socket
boost::asio::streambuf m_response
boost::asio::deadline_timer m_keepalive_timer
boost::asio::deadline_timer m_reconnect_timer
boost::asio::deadline_timer m_dead_conn_timer
boost::shared_ptr
< boost::asio::io_service::work > 
m_ios_work
boost::thread m_ios_thread
stream_manager m_streams
volatile sig_atomic_t m_state
volatile sig_atomic_t m_proto

Detailed Description

Definition at line 46 of file stomp_client_impl.h.


Member Typedef Documentation

typedef boost::function<void (const boost::system::error_code&, const std::string&)> moost::mq::stomp_client::impl::error_cb_t

Definition at line 49 of file stomp_client_impl.h.

typedef std::map<std::string, std::string> moost::mq::stomp_client::impl::header_map [private]

Definition at line 86 of file stomp_client_impl.h.


Constructor & Destructor Documentation

moost::mq::stomp_client::impl::impl ( size_t  consumer_pool_size,
const boost::posix_time::time_duration &  keepalive_interval,
const boost::posix_time::time_duration &  reconnect_interval 
)

Definition at line 45 of file stomp_client_impl.cpp.


Member Function Documentation

void moost::mq::stomp_client::impl::connect ( const std::string &  hostname,
int  port,
error_cb_t  error_cb 
)

Definition at line 74 of file stomp_client_impl.cpp.

Here is the call graph for this function:

boost::system::error_code moost::mq::stomp_client::impl::connect ( ) [private]

Definition at line 88 of file stomp_client_impl.cpp.

Here is the call graph for this function:

Definition at line 362 of file stomp_client_impl.cpp.

Here is the call graph for this function:

Definition at line 80 of file stomp_client_impl.h.

Here is the call graph for this function:

Definition at line 75 of file stomp_client_impl.h.

Here is the call graph for this function:

void moost::mq::stomp_client::impl::handle_dead_conn ( const boost::system::error_code &  err) [private]

Definition at line 395 of file stomp_client_impl.cpp.

Here is the caller graph for this function:

void moost::mq::stomp_client::impl::handle_keepalive ( const boost::system::error_code &  err) [private]

Definition at line 377 of file stomp_client_impl.cpp.

Here is the caller graph for this function:

void moost::mq::stomp_client::impl::handle_reconnect ( const boost::system::error_code &  err) [private]

Definition at line 387 of file stomp_client_impl.cpp.

Here is the caller graph for this function:

void moost::mq::stomp_client::impl::handle_recv ( const boost::system::error_code &  err) [private]

Definition at line 442 of file stomp_client_impl.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void moost::mq::stomp_client::impl::handle_stomp_error ( const header_map headers,
const std::string &  body 
) [private]

Definition at line 415 of file stomp_client_impl.cpp.

void moost::mq::stomp_client::impl::handle_write ( boost::shared_ptr< boost::asio::streambuf >  ,
const boost::system::error_code &  err 
) [private]

Definition at line 368 of file stomp_client_impl.cpp.

Here is the caller graph for this function:

Definition at line 65 of file stomp_client_impl.h.

Definition at line 70 of file stomp_client_impl.h.

Definition at line 356 of file stomp_client_impl.cpp.

Here is the call graph for this function:

boost::system::error_code moost::mq::stomp_client::impl::make_error_code ( error::type  ec) [static, private]

Definition at line 40 of file stomp_client_impl.cpp.

Here is the call graph for this function:

void moost::mq::stomp_client::impl::on_message ( const header_map headers,
const std::string &  msg 
) [private]

Definition at line 495 of file stomp_client_impl.cpp.

void moost::mq::stomp_client::impl::receive_from_queue ( std::string &  command,
header_map headers,
std::string &  body 
) [private]

Definition at line 332 of file stomp_client_impl.cpp.

Definition at line 173 of file stomp_client_impl.cpp.

Here is the call graph for this function:

Definition at line 528 of file stomp_client_impl.cpp.

Here is the call graph for this function:

void moost::mq::stomp_client::impl::send ( const std::string &  topic,
const std::string &  message 
)

Definition at line 267 of file stomp_client_impl.cpp.

Here is the call graph for this function:

boost::system::error_code moost::mq::stomp_client::impl::send_to_queue ( const std::string &  command,
const std::string &  body = std::string() 
) [private]

Definition at line 279 of file stomp_client_impl.cpp.

boost::system::error_code moost::mq::stomp_client::impl::send_to_queue ( const std::string &  command,
const header_map headers,
const std::string &  body = std::string() 
) [private]

Definition at line 287 of file stomp_client_impl.cpp.

void moost::mq::stomp_client::impl::send_to_queue ( const std::string &  command,
const header_map headers,
const std::string &  body,
boost::system::error_code *  ec 
) [private]

Definition at line 305 of file stomp_client_impl.cpp.

Here is the call graph for this function:

void moost::mq::stomp_client::impl::send_to_queue_async ( const std::string &  command,
const std::string &  body = std::string() 
) [private]

Definition at line 294 of file stomp_client_impl.cpp.

void moost::mq::stomp_client::impl::send_to_queue_async ( const std::string &  command,
const header_map headers,
const std::string &  body = std::string() 
) [private]

Definition at line 300 of file stomp_client_impl.cpp.

void moost::mq::stomp_client::impl::subscribe ( const std::string &  topic,
stream::message_cb_t  message_cb,
stomp_client::ack::type  ack_type,
const boost::posix_time::time_duration &  max_msg_interval 
)

Definition at line 210 of file stomp_client_impl.cpp.

Here is the call graph for this function:

void moost::mq::stomp_client::impl::subscribe ( const std::string &  topic,
stomp_client::ack::type  ack_type 
) [private]

Definition at line 226 of file stomp_client_impl.cpp.

Here is the call graph for this function:

void moost::mq::stomp_client::impl::unsubscribe ( const std::string &  topic)

Definition at line 247 of file stomp_client_impl.cpp.

Here is the call graph for this function:


Member Data Documentation

boost::asio::deadline_timer moost::mq::stomp_client::impl::m_dead_conn_timer [private]

Definition at line 148 of file stomp_client_impl.h.

Definition at line 139 of file stomp_client_impl.h.

boost::asio::io_service moost::mq::stomp_client::impl::m_ios [private]

Definition at line 143 of file stomp_client_impl.h.

Definition at line 150 of file stomp_client_impl.h.

boost::shared_ptr<boost::asio::io_service::work> moost::mq::stomp_client::impl::m_ios_work [private]

Definition at line 149 of file stomp_client_impl.h.

const boost::posix_time::time_duration moost::mq::stomp_client::impl::m_keepalive_interval [private]

Definition at line 136 of file stomp_client_impl.h.

boost::asio::deadline_timer moost::mq::stomp_client::impl::m_keepalive_timer [private]

Definition at line 146 of file stomp_client_impl.h.

Definition at line 140 of file stomp_client_impl.h.

volatile sig_atomic_t moost::mq::stomp_client::impl::m_proto [private]

Definition at line 155 of file stomp_client_impl.h.

const boost::posix_time::time_duration moost::mq::stomp_client::impl::m_reconnect_interval [private]

Definition at line 137 of file stomp_client_impl.h.

boost::asio::deadline_timer moost::mq::stomp_client::impl::m_reconnect_timer [private]

Definition at line 147 of file stomp_client_impl.h.

boost::asio::streambuf moost::mq::stomp_client::impl::m_response [private]

Definition at line 145 of file stomp_client_impl.h.

boost::asio::ip::tcp::socket moost::mq::stomp_client::impl::m_socket [private]

Definition at line 144 of file stomp_client_impl.h.

volatile sig_atomic_t moost::mq::stomp_client::impl::m_state [private]

Definition at line 154 of file stomp_client_impl.h.


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