31 #include <boost/shared_ptr.hpp>
32 #include <boost/thread/thread.hpp>
34 #include <boost/asio.hpp>
35 #include <boost/asio/ip/tcp.hpp>
37 #include <rsc/logging/Logger.h>
39 #include <rsc/patterns/Singleton.h>
41 #include "../AsioServiceContext.h"
72 const std::string& host,
73 const boost::uint16_t& port,
77 typedef std::pair<std::string, boost::uint16_t>
Endpoint;
78 typedef boost::shared_ptr<boost::asio::ip::tcp::socket>
SocketPtr;
80 typedef boost::shared_ptr<boost::asio::io_service::work>
WorkPtr;
83 typedef std::map<Endpoint, boost::weak_ptr<BusServer> >
BusServerMap;
93 BusPtr getBusClientFor(
const std::string& host,
101 static void checkOptions(
BusPtr bus,
bool tcpnodelay);
107 template<
class BusType>
108 boost::shared_ptr<BusType> searchInMap(
const Endpoint& endpoint,
110 std::map<
Endpoint, boost::weak_ptr<BusType> >& map);
rsc::logging::LoggerPtr logger
std::map< Endpoint, boost::weak_ptr< BusServer > > BusServerMap
boost::shared_ptr< Factory > FactoryPtr
boost::shared_ptr< AsioServiceContext > AsioServiceContextPtr
boost::shared_ptr< boost::asio::ip::tcp::socket > SocketPtr
boost::shared_ptr< BusServer > BusServerPtr
FactoryPtr getDefaultFactory()
The singleton instance of this class is responsible for managing bus provider objects.
std::map< Endpoint, boost::weak_ptr< Bus > > BusClientMap
AsioServiceContextPtr asioService
std::pair< std::string, boost::uint16_t > Endpoint
boost::shared_ptr< boost::asio::io_service::work > WorkPtr
boost::shared_ptr< Bus > BusPtr