31 #include <boost/thread/thread.hpp>
33 #include <boost/asio.hpp>
34 #include <boost/asio/ip/tcp.hpp>
36 #include <rsc/logging/Logger.h>
38 #include <rsc/patterns/Singleton.h>
59 class RSB_EXPORT
Factory :
public rsc::patterns::Singleton<Factory> {
60 friend class rsc::patterns::Singleton<
Factory>;
71 const std::string& host,
72 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;
97 BusPtr getBusClientFor(
const std::string& host,
103 boost::uint16_t port,
107 void removeBusClient(
BusPtr bus);
109 void removeBusServer(
BusPtr bus);
111 static void checkOptions(
BusPtr bus,
bool tcpnodelay);
rsc::logging::LoggerPtr logger
Instances of this class provide access to a socket-based bus.
boost::asio::io_service service
boost::shared_ptr< boost::asio::ip::tcp::socket > SocketPtr
boost::shared_ptr< BusServer > BusServerPtr
Instances of this class provide access to a socket-based bus for local and remote bus clients...
This class is intended to be used as a base class for connector classes of the socket-based transport...
The singleton instance of this class is responsible for managing bus provider objects.
std::map< Endpoint, BusServerPtr > BusServerMap
std::pair< std::string, boost::uint16_t > Endpoint
std::map< Endpoint, BusPtr > BusClientMap
boost::shared_ptr< boost::asio::io_service::work > WorkPtr
boost::shared_ptr< Bus > BusPtr