RSB
0.7.0
|
The singleton instance of this class is responsible for managing bus provider objects. More...
#include <Factory.h>
Public Member Functions | |
~Factory () | |
BusPtr | getBus (const Server &serverMode, const std::string &host, const boost::uint16_t &port, bool tcpnodelay, ConnectorBase *connector) |
Returns either a BusClient or Server depending on the chosen serverMode and the existence of a server in the current process. |
Private Types | |
typedef std::pair< std::string, boost::uint16_t > | Endpoint |
typedef boost::shared_ptr < boost::asio::ip::tcp::socket > | SocketPtr |
typedef boost::shared_ptr < boost::asio::io_service::work > | WorkPtr |
typedef std::map< Endpoint, BusPtr > | BusClientMap |
typedef std::map< Endpoint, BusServerPtr > | BusServerMap |
Private Member Functions | |
Factory () | |
BusPtr | getBusClientFor (const std::string &host, boost::uint16_t port, bool tcpnodelay, ConnectorBase *connector) |
BusServerPtr | getBusServerFor (const std::string &host, boost::uint16_t port, bool tcpnodelay, ConnectorBase *connector) |
void | removeBusClient (BusPtr bus) |
void | removeBusServer (BusPtr bus) |
Static Private Member Functions | |
static void | checkOptions (BusPtr bus, bool tcpnodelay) |
Private Attributes | |
rsc::logging::LoggerPtr | logger |
BusClientMap | busClients |
BusServerMap | busServers |
boost::mutex | busMutex |
boost::asio::io_service | service |
WorkPtr | keepAlive |
boost::thread | thread |
Friends | |
class | rsc::patterns::Singleton< Factory > |
class | Bus |
class | BusServer |
The singleton instance of this class is responsible for managing bus provider objects.
For each endpoint (i.e. address and port), at most one client or server bus provider can exist.
|
private |
|
private |
|
private |
|
private |
|
private |
rsb::transport::socket::Factory::~Factory | ( | ) |
Definition at line 57 of file Factory.cpp.
References busClients, keepAlive, logger, and thread.
|
private |
Definition at line 50 of file Factory.cpp.
References logger.
|
staticprivate |
Definition at line 249 of file Factory.cpp.
Referenced by getBusClientFor(), and getBusServerFor().
BusPtr rsb::transport::socket::Factory::getBus | ( | const Server & | serverMode, |
const std::string & | host, | ||
const boost::uint16_t & | port, | ||
bool | tcpnodelay, | ||
ConnectorBase * | connector | ||
) |
Returns either a BusClient or Server depending on the chosen serverMode and the existence of a server in the current process.
Definition at line 221 of file Factory.cpp.
References busMutex, getBusClientFor(), getBusServerFor(), logger, rsb::transport::socket::SERVER_AUTO, rsb::transport::socket::SERVER_NO, and rsb::transport::socket::SERVER_YES.
Referenced by rsb::transport::socket::ConnectorBase::activate().
|
private |
Definition at line 68 of file Factory.cpp.
References Bus, busClients, checkOptions(), logger, and service.
Referenced by getBus().
|
private |
Definition at line 173 of file Factory.cpp.
References BusServer, busServers, checkOptions(), logger, and service.
Referenced by getBus().
|
private |
Definition at line 158 of file Factory.cpp.
References busClients, busMutex, and logger.
|
private |
Definition at line 205 of file Factory.cpp.
References busMutex, busServers, and logger.
|
friend |
Definition at line 61 of file Factory.h.
Referenced by getBusClientFor().
|
friend |
Definition at line 62 of file Factory.h.
Referenced by getBusServerFor().
|
private |
Definition at line 87 of file Factory.h.
Referenced by getBusClientFor(), removeBusClient(), and ~Factory().
|
private |
Definition at line 89 of file Factory.h.
Referenced by getBus(), removeBusClient(), and removeBusServer().
|
private |
Definition at line 88 of file Factory.h.
Referenced by getBusServerFor(), and removeBusServer().
|
private |
Definition at line 92 of file Factory.h.
Referenced by ~Factory().
|
private |
Definition at line 85 of file Factory.h.
Referenced by Factory(), getBus(), getBusClientFor(), getBusServerFor(), removeBusClient(), removeBusServer(), and ~Factory().
|
private |
Definition at line 91 of file Factory.h.
Referenced by getBusClientFor(), and getBusServerFor().
|
private |
Definition at line 93 of file Factory.h.
Referenced by ~Factory().