![]() |
Dripline-Cpp
v2.4.2
Dripline Implementation in C++
|
Basic AMQP interactions, including sending messages and interacting with AMQP channels. More...
#include <core.hh>
Public Member Functions | |
core (const scarab::param_node &a_config=scarab::param_node(), const std::string &a_broker_address="", unsigned a_port=0, const std::string &a_auth_file="", const bool a_make_connection=true) | |
core (const bool a_make_connection, const scarab::param_node &a_config=scarab::param_node()) | |
core (const core &a_orig) | |
core (core &&a_orig) | |
virtual | ~core () |
core & | operator= (const core &a_orig) |
core & | operator= (core &&a_orig) |
virtual sent_msg_pkg_ptr | send (request_ptr_t a_request) const |
virtual sent_msg_pkg_ptr | send (reply_ptr_t a_reply) const |
virtual sent_msg_pkg_ptr | send (alert_ptr_t a_alert) const |
snake_case_mv_referrable (std::string, address) | |
snake_case_mv_accessible (unsigned, port) | |
snake_case_mv_referrable (std::string, username) | |
snake_case_mv_referrable (std::string, password) | |
snake_case_mv_referrable (std::string, requests_exchange) | |
snake_case_mv_referrable (std::string, alerts_exchange) | |
snake_case_mv_referrable (std::string, heartbeat_routing_key) | |
snake_case_mv_accessible (unsigned, max_payload_size) | |
snake_case_mv_accessible (bool, make_connection) | |
Static Public Member Functions | |
static bool | listen_for_message (amqp_envelope_ptr &a_envelope, amqp_channel_ptr a_channel, const std::string &a_consumer_tag, int a_timeout_ms=0, bool a_do_ack=true) |
return: if false, channel is no longer useable; if true, may be reused More... | |
Static Public Attributes | |
static bool | s_offline = false |
Protected Member Functions | |
sent_msg_pkg_ptr | do_send (message_ptr_t a_message, const std::string &a_exchange, bool a_expect_reply) const |
amqp_channel_ptr | send_withreply (message_ptr_t a_message, std::string &a_reply_consumer_tag, const std::string &a_exchange) const |
bool | send_noreply (message_ptr_t a_message, const std::string &a_exchange) const |
amqp_channel_ptr | open_channel () const |
Static Protected Member Functions | |
static bool | setup_exchange (amqp_channel_ptr a_channel, const std::string &a_exchange) |
static bool | setup_queue (amqp_channel_ptr a_channel, const std::string &a_queue_name) |
static bool | bind_key (amqp_channel_ptr a_channel, const std::string &a_exchange, const std::string &a_queue_name, const std::string &a_routing_key) |
static std::string | start_consuming (amqp_channel_ptr a_channel, const std::string &a_queue_name) |
static bool | stop_consuming (amqp_channel_ptr a_channel, std::string &a_consumer_tag) |
static bool | remove_queue (amqp_channel_ptr a_channel, const std::string &a_queue_name) |
Friends | |
class | receiver |
Basic AMQP interactions, including sending messages and interacting with AMQP channels.
The configuration for a core
object is supplied via the constructor. The basic required information can be obtained from dripline_config
. The configuration values have default parameters, and they can be modified with the config param_node
, and a few parameters can be specified explicitly as constructor arguments. The order of precedence for those values is (items higher in the list override those below them): Constructor arguments (other than a_config
) Config param_node
object Defaults
If the broker is not specified in either the config object or as a constructor parameter, it will be requested from the authentication file.
A second constructor allows a user to create a core
object without connecting to a broker.
The primary user interface is core::send()
, one of which exists for each type of message (request, reply, and alert).
Core
also contains a number of utility functions that wrap the main interactions with AMQP channels. Classes wishing to take advantage of those functions should inherit from core
.
core | ( | const scarab::param_node & | a_config = scarab::param_node() , |
const std::string & | a_broker_address = "" , |
||
unsigned | a_port = 0 , |
||
const std::string & | a_auth_file = "" , |
||
const bool | a_make_connection = true |
||
) |
core | ( | const bool | a_make_connection, |
const scarab::param_node & | a_config = scarab::param_node() |
||
) |
|
staticprotected |
|
protected |
|
static |
|
protected |
|
staticprotected |
|
virtual |
|
virtual |
|
virtual |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
snake_case_mv_accessible | ( | unsigned | , |
port | |||
) |
snake_case_mv_accessible | ( | unsigned | , |
max_payload_size | |||
) |
snake_case_mv_accessible | ( | bool | , |
make_connection | |||
) |
snake_case_mv_referrable | ( | std::string | , |
address | |||
) |
snake_case_mv_referrable | ( | std::string | , |
username | |||
) |
snake_case_mv_referrable | ( | std::string | , |
password | |||
) |
snake_case_mv_referrable | ( | std::string | , |
requests_exchange | |||
) |
snake_case_mv_referrable | ( | std::string | , |
alerts_exchange | |||
) |
snake_case_mv_referrable | ( | std::string | , |
heartbeat_routing_key | |||
) |
|
staticprotected |
|
staticprotected |