RSB
0.16.1
|
A facade around BusServer instances to allow breaking dependency cycles. More...
#include <LifecycledBusServer.h>
Public Member Functions | |
LifecycledBusServer (BusServerPtr server) | |
virtual | ~LifecycledBusServer () |
virtual void | addSink (InConnectorPtr sink) |
virtual void | removeSink (InConnector *sink) |
virtual void | addConnection (BusConnectionPtr connection) |
Adds connection to the list of connections of the bus. More... | |
virtual void | removeConnection (BusConnectionPtr connection) |
Removes connection from the list of connections of this bus. More... | |
virtual bool | isTcpnodelay () const |
virtual void | handle (EventPtr event) |
Handle event. More... | |
virtual AsioServiceContextPtr | getService () const |
void | activate () |
void | deactivate () |
void | handleIncoming (EventPtr event, BusConnectionPtr connection) |
virtual const std::string | getTransportURL () const |
virtual void | printContents (std::ostream &stream) const |
Public Member Functions inherited from rsb::transport::socket::BusServer | |
BusServer (AsioServiceContextPtr asioService, bool tcpnodelay) | |
virtual | ~BusServer () |
Public Member Functions inherited from rsb::transport::socket::Bus | |
Bus (AsioServiceContextPtr asioService, bool tcpnodelay=false) | |
virtual | ~Bus () |
Public Member Functions inherited from rsb::eventprocessing::Handler | |
virtual | ~Handler () |
Private Attributes | |
rsc::logging::LoggerPtr | logger |
BusServerPtr | server |
Additional Inherited Members | |
Protected Types inherited from rsb::transport::socket::Bus | |
typedef std::list< BusConnectionPtr > | ConnectionList |
Protected Member Functions inherited from rsb::transport::socket::Bus | |
ConnectionList | getConnections () const |
boost::recursive_mutex & | getConnectionLock () |
A facade around BusServer instances to allow breaking dependency cycles.
This implementation specifically calls deactivate on the underlying server instance in its destructor. This is known to break a dependency cycle in BusServerImpl which would otherwise prevent clean destruction through shared_ptr instances.
Apart from this behavior, all calls are passed to the underlying instance.
Definition at line 47 of file LifecycledBusServer.h.
rsb::transport::socket::LifecycledBusServer::LifecycledBusServer | ( | BusServerPtr | server | ) |
Definition at line 37 of file LifecycledBusServer.cpp.
|
virtual |
Definition at line 43 of file LifecycledBusServer.cpp.
|
virtual |
Implements rsb::transport::socket::BusServer.
Definition at line 79 of file LifecycledBusServer.cpp.
|
virtual |
Adds connection to the list of connections of the bus.
connection should start receiving events, only after being added to the bus.
connection | The connection that should be added. |
Reimplemented from rsb::transport::socket::Bus.
Definition at line 59 of file LifecycledBusServer.cpp.
References server.
|
virtual |
Reimplemented from rsb::transport::socket::Bus.
Definition at line 51 of file LifecycledBusServer.cpp.
References server.
|
virtual |
Implements rsb::transport::socket::BusServer.
Definition at line 84 of file LifecycledBusServer.cpp.
|
virtual |
Reimplemented from rsb::transport::socket::Bus.
Definition at line 75 of file LifecycledBusServer.cpp.
References server.
|
virtual |
Reimplemented from rsb::transport::socket::Bus.
Definition at line 94 of file LifecycledBusServer.cpp.
References server.
|
virtual |
Handle event.
event | The event that should be handled. |
Reimplemented from rsb::transport::socket::Bus.
Definition at line 71 of file LifecycledBusServer.cpp.
References server.
|
virtual |
Implements rsb::transport::socket::BusServer.
Definition at line 89 of file LifecycledBusServer.cpp.
References server.
|
virtual |
Reimplemented from rsb::transport::socket::Bus.
Definition at line 67 of file LifecycledBusServer.cpp.
References server.
|
virtual |
Reimplemented from rsb::transport::socket::Bus.
Definition at line 98 of file LifecycledBusServer.cpp.
References server.
|
virtual |
Removes connection from the list of connections of this bus.
connection is not closed or otherwise modified.
connection | The connection that should be removed. |
Reimplemented from rsb::transport::socket::Bus.
Definition at line 63 of file LifecycledBusServer.cpp.
References server.
|
virtual |
Reimplemented from rsb::transport::socket::Bus.
Definition at line 55 of file LifecycledBusServer.cpp.
References server.
|
private |
Definition at line 77 of file LifecycledBusServer.h.
Referenced by activate(), deactivate(), and ~LifecycledBusServer().
|
private |
Definition at line 78 of file LifecycledBusServer.h.
Referenced by activate(), addConnection(), addSink(), deactivate(), getService(), getTransportURL(), handle(), handleIncoming(), isTcpnodelay(), printContents(), removeConnection(), removeSink(), and ~LifecycledBusServer().