RSB  0.17.0
rsb::transport::socket Namespace Reference

Classes

class  Bus
 Instances of this class provide access to a socket-based bus. More...
 
class  BusConnection
 Instances of this class implement connections to a socket-based bus. More...
 
class  BusServer
 Instances of this class provide access to a socket-based bus for local and remote bus clients. More...
 
class  BusServerImpl
 Instances of this class provide access to a socket-based bus for local and remote bus clients. More...
 
class  ConnectorBase
 This class is intended to be used as a base class for connector classes of the socket-based transport. More...
 
class  Factory
 The singleton instance of this class is responsible for managing bus provider objects. More...
 
class  InConnector
 Instances of this class receive events from a bus that is accessed via a socket connection. More...
 
class  InPullConnector
 Instances of this class receive events from a bus that is accessed via a socket connection. More...
 
class  InPushConnector
 Instances of this class receive events from a bus that is accessed via a socket connection. More...
 
class  LifecycledBusServer
 A facade around BusServer instances to allow breaking dependency cycles. More...
 
class  OutConnector
 Instances of this connector class push events into Bus objects which take care of socket-based broadcast and delivery. More...
 

Typedefs

typedef boost::shared_ptr< InConnectorInConnectorPtr
 
typedef boost::shared_ptr< BusBusPtr
 
typedef boost::shared_ptr< BusConnectionBusConnectionPtr
 
typedef boost::shared_ptr< BusServerBusServerPtr
 
typedef boost::shared_ptr< ConnectorBaseConnectorBasePtr
 
typedef boost::shared_ptr< FactoryFactoryPtr
 
typedef boost::shared_ptr< InPullConnectorInPullConnectorPtr
 
typedef boost::shared_ptr< InPushConnectorInPushConnectorPtr
 

Enumerations

enum  Server { SERVER_NO = 0, SERVER_YES = 1, SERVER_AUTO = 2 }
 

Functions

std::string safeSocketExceptionString (const std::exception &exception)
 
FactoryPtr getDefaultFactory ()
 
EventPtr notificationToEvent (protocol::Notification &notification, bool exposeWireSchema=false)
 Converts notification into an Event. More...
 
void eventToNotification (protocol::Notification &notification, const EventPtr &event, const std::string &wireSchema, const std::string &data)
 Converts the Event event into a protocol::Notification, storing the result in notification. More...
 
template<typename Ch , typename Tr >
std::basic_istream< Ch, Tr > & operator>> (std::basic_istream< Ch, Tr > &stream, Server &value)
 
template<typename Ch , typename Tr >
std::basic_ostream< Ch, Tr > & operator<< (std::basic_ostream< Ch, Tr > &stream, const Server &value)
 

Variables

const string DEFAULT_HOST = "localhost"
 
const uint16_t DEFAULT_PORT = 55555
 

Typedef Documentation

Definition at line 134 of file BusConnection.h.

typedef boost::shared_ptr< Bus > rsb::transport::socket::BusPtr

Definition at line 51 of file BusConnection.h.

typedef boost::shared_ptr<BusServer> rsb::transport::socket::BusServerPtr

Definition at line 67 of file BusServer.h.

Definition at line 127 of file ConnectorBase.h.

typedef boost::shared_ptr<Factory> rsb::transport::socket::FactoryPtr

Definition at line 113 of file Factory.h.

Definition at line 55 of file Bus.h.

Definition at line 96 of file InPullConnector.h.

Definition at line 90 of file InPushConnector.h.

Enumeration Type Documentation

Enumerator
SERVER_NO 
SERVER_YES 
SERVER_AUTO 

Definition at line 40 of file Types.h.

Function Documentation

void rsb::transport::socket::eventToNotification ( protocol::Notification &  notification,
const EventPtr event,
const std::string &  wireSchema,
const std::string &  data 
)

Converts the Event event into a protocol::Notification, storing the result in notification.

Parameters
notificationThe protocol::Notification object into which the conversion should be performed.
eventevent The Event object that should be serialized.
wireSchemaThe wire-Schema that should be stored in notification.
dataThe payload that should be stored in notification.

Definition at line 81 of file Serialization.cpp.

Referenced by rsb::transport::socket::BusConnection::sendEvent().

Here is the caller graph for this function:

RSB_EXPORT FactoryPtr rsb::transport::socket::getDefaultFactory ( )

Definition at line 224 of file Factory.cpp.

EventPtr rsb::transport::socket::notificationToEvent ( protocol::Notification &  notification,
bool  exposeWireSchema = false 
)

Converts notification into an Event.

The event payload will be copied from notification into the event unmodified to allow application of arbitrary converters.

Parameters
notificationThe protocol::Notification from which the event should be constructed.
exposeWireSchemaControls whether the wire-schema stored in notification should be exposed in a meta data item of the created event.
Returns
A shared pointer to a newly allocated rsb::Event.

TODO(jmoringe): it may be possible to keep a single event instance here since connectors probably have to copy events

Definition at line 39 of file Serialization.cpp.

References rsb::MetaData::setCreateTime(), rsb::MetaData::setReceiveTime(), rsb::MetaData::setSendTime(), rsb::MetaData::setUserInfo(), and rsb::MetaData::setUserTime().

Referenced by rsb::transport::socket::BusConnection::handleReadBody().

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename Ch , typename Tr >
std::basic_ostream<Ch, Tr>& rsb::transport::socket::operator<< ( std::basic_ostream< Ch, Tr > &  stream,
const Server value 
)

Definition at line 69 of file Types.h.

References DEFAULT_HOST, DEFAULT_PORT, SERVER_AUTO, SERVER_NO, and SERVER_YES.

template<typename Ch , typename Tr >
std::basic_istream<Ch, Tr>& rsb::transport::socket::operator>> ( std::basic_istream< Ch, Tr > &  stream,
Server value 
)

Definition at line 47 of file Types.h.

References SERVER_AUTO, SERVER_NO, and SERVER_YES.

std::string rsb::transport::socket::safeSocketExceptionString ( const std::exception &  exception)

Definition at line 52 of file BusConnection.cpp.

Referenced by rsb::transport::socket::BusConnection::handleReadLength(), and rsb::transport::socket::BusConnection::performSafeCleanup().

Here is the caller graph for this function:

Variable Documentation

const std::string rsb::transport::socket::DEFAULT_HOST = "localhost"

Definition at line 37 of file Types.cpp.

Referenced by operator<<().

const boost::uint16_t rsb::transport::socket::DEFAULT_PORT = 55555

Definition at line 39 of file Types.cpp.

Referenced by operator<<().