RSB  0.19.0
rsb::transport::socket::Bus Class Referenceabstract

Instances of this class provide access to a socket-based bus. More...

#include <Bus.h>

Inheritance diagram for rsb::transport::socket::Bus:
Inheritance graph
Collaboration diagram for rsb::transport::socket::Bus:
Collaboration graph

Public Member Functions

virtual ~Bus ()
 
virtual void addSink (InConnectorPtr sink)=0
 
virtual void removeSink (const InConnector *sink)=0
 
virtual void addConnection (BusConnectionPtr connection)=0
 Adds connection to the list of connections of the bus. More...
 
virtual void removeConnection (BusConnectionPtr connection)=0
 Removes connection from the list of connections of this bus. More...
 
virtual bool isTcpnodelay () const =0
 
virtual void handle (EventPtr event)=0
 Handle event. More...
 
virtual void handleIncoming (EventPtr event, BusConnectionPtr connection)=0
 
virtual const std::string getTransportURL () const =0
 
- Public Member Functions inherited from rsb::eventprocessing::Handler
virtual ~Handler ()
 

Friends

class BusConnection
 

Detailed Description

Instances of this class provide access to a socket-based bus.

It is transparent for clients (connectors) of this class whether is accessed by running the bus server or by connecting to the bus server as a client.

In-direction connectors add themselves as event sinks using the addSink method.

Out-direction connectors submit events to the bus using the handle method.

Author
jmoringe

Definition at line 64 of file Bus.h.

Constructor & Destructor Documentation

rsb::transport::socket::Bus::~Bus ( )
virtual

Definition at line 33 of file Bus.cpp.

Member Function Documentation

virtual void rsb::transport::socket::Bus::addConnection ( BusConnectionPtr  connection)
pure virtual

Adds connection to the list of connections of the bus.

connection should start receiving events, only after being added to the bus.

Parameters
connectionThe connection that should be added.

Implemented in rsb::transport::socket::BusImpl, and rsb::transport::socket::LifecycledBusServer.

virtual void rsb::transport::socket::Bus::addSink ( InConnectorPtr  sink)
pure virtual
virtual const std::string rsb::transport::socket::Bus::getTransportURL ( ) const
pure virtual
virtual void rsb::transport::socket::Bus::handle ( EventPtr  event)
pure virtual

Handle event.

Parameters
eventThe event that should be handled.

Implements rsb::eventprocessing::Handler.

Implemented in rsb::transport::socket::BusImpl, and rsb::transport::socket::LifecycledBusServer.

virtual void rsb::transport::socket::Bus::handleIncoming ( EventPtr  event,
BusConnectionPtr  connection 
)
pure virtual
virtual bool rsb::transport::socket::Bus::isTcpnodelay ( ) const
pure virtual
virtual void rsb::transport::socket::Bus::removeConnection ( BusConnectionPtr  connection)
pure virtual

Removes connection from the list of connections of this bus.

connection is not closed or otherwise modified.

Parameters
connectionThe connection that should be removed.

Implemented in rsb::transport::socket::BusImpl, and rsb::transport::socket::LifecycledBusServer.

virtual void rsb::transport::socket::Bus::removeSink ( const InConnector sink)
pure virtual

Friends And Related Function Documentation

friend class BusConnection
friend

Definition at line 65 of file Bus.h.


The documentation for this class was generated from the following files: