|
libmoost
|
#include <stomp_client_impl.h>

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 |
Definition at line 46 of file stomp_client_impl.h.
| 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.
| 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.
Definition at line 62 of file stomp_client_impl.cpp.
| void moost::mq::stomp_client::impl::connect | ( | const std::string & | hostname, |
| int | port, | ||
| error_cb_t | error_cb | ||
| ) |
| boost::system::error_code moost::mq::stomp_client::impl::connect | ( | ) | [private] |
| void moost::mq::stomp_client::impl::dead_conn_detect | ( | ) | [private] |
Definition at line 158 of file stomp_client_impl.cpp.
| size_t moost::mq::stomp_client::impl::get_num_pending | ( | ) | const [inline] |
| uint64_t moost::mq::stomp_client::impl::get_num_processed | ( | ) | const [inline] |
| void moost::mq::stomp_client::impl::handle_dead_conn | ( | const boost::system::error_code & | err | ) | [private] |
| void moost::mq::stomp_client::impl::handle_keepalive | ( | const boost::system::error_code & | err | ) | [private] |
| void moost::mq::stomp_client::impl::handle_reconnect | ( | const boost::system::error_code & | err | ) | [private] |
| 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.


| 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] |
| bool moost::mq::stomp_client::impl::is_connected | ( | ) | const [inline] |
Definition at line 65 of file stomp_client_impl.h.
| bool moost::mq::stomp_client::impl::is_online | ( | ) | const [inline] |
Definition at line 70 of file stomp_client_impl.h.
| void moost::mq::stomp_client::impl::keepalive | ( | ) | [private] |
| boost::system::error_code moost::mq::stomp_client::impl::make_error_code | ( | error::type | ec | ) | [static, private] |
| 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.
| void moost::mq::stomp_client::impl::reconnect | ( | ) | [private] |
| void moost::mq::stomp_client::impl::recv_more | ( | ) | [private] |
| void moost::mq::stomp_client::impl::send | ( | const std::string & | topic, |
| const std::string & | message | ||
| ) |
| 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] |
| 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 | ||
| ) |
| void moost::mq::stomp_client::impl::subscribe | ( | const std::string & | topic, |
| stomp_client::ack::type | ack_type | ||
| ) | [private] |
| void moost::mq::stomp_client::impl::unsubscribe | ( | const std::string & | topic | ) |
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 141 of file stomp_client_impl.h.
std::string moost::mq::stomp_client::impl::m_hostname [private] |
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.
boost::thread moost::mq::stomp_client::impl::m_ios_thread [private] |
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.
int moost::mq::stomp_client::impl::m_port [private] |
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.
Definition at line 152 of file stomp_client_impl.h.