rsb.transport.local¶
Contains a highly efficient in-process transport implementation.
This transport allows participants inside one python process to communicate without serialization overhead.
Code author: jwienke
Functions
Classes
|
Singleton-like representation of the local bus. |
|
InConnector for the local transport. |
|
In-process OutConnector. |
|
-
class
rsb.transport.local.Bus¶ Bases:
objectSingleton-like representation of the local bus.
Code author: jwienke
-
add_sink(sink)¶ Add a sink for events pushed to the Bus.
- Parameters
sink – the sink to add
-
get_transport_url()¶
-
handle(event)¶ Dispatches the provided event to all sinks of the appropriate scope.
- Parameters
event – event to dispatch
- Type event
rsb.Event
-
remove_sink(sink)¶ Remove a sink to not be notified anymore.
- Parameters
sink – sink to remove
-
-
class
rsb.transport.local.InConnector(bus=<rsb.transport.local.Bus object>, converters=None, options=None, **kwargs)¶ Bases:
rsb.transport.InConnectorInConnector for the local transport.
Code author: jwienke
-
activate()¶
-
deactivate()¶
-
filter_notify(filter_, action)¶
-
get_transport_url()¶
-
handle(event)¶
-
set_observer_action(action)¶ Set the action used by the connector to notify about incoming events.
The call to this method must be thread-safe.
- Parameters
action – action called if a new message is received from the connector. Must accept an
Eventas parameter.
-
set_quality_of_service_spec(qos)¶
-
property
scope¶
-
property
wire_type¶ Return the serialization type used for this connector.
- Returns
python serialization type
-
-
class
rsb.transport.local.OutConnector(bus=<rsb.transport.local.Bus object>, converters=None, options=None, **kwargs)¶ Bases:
rsb.transport.OutConnectorIn-process OutConnector.
Code author: jwienke
-
activate()¶
-
deactivate()¶
-
get_transport_url()¶
-
handle(event)¶ Send
eventand adapts its meta data with the actual send time.- Parameters
event – event to send
-
set_quality_of_service_spec(qos)¶
-
property
scope¶
-
property
wire_type¶ Return the serialization type used for this connector.
- Returns
python serialization type
-
-
class
rsb.transport.local.TransportFactory¶ Bases:
rsb.transport.TransportFactoryTransportFactoryimplementation for the local transport.Code author: jwienke
-
create_in_connector(converters, options)¶ Create a new
InConnectorfor the represented transport.- Parameters
converters – the converters to use for this type options(dict of str): options for the new connector
- Type converters
ConverterSelectionStrategy
- Returns
the new connector instance
- Rtype
rsb.transport.InConnector
-
create_out_connector(converters, options)¶ Create a new
OutConnectorfor the represented transport.- Parameters
converters – the converters to use for this type options(dict of str): options for the new connector
- Type converters
ConverterSelectionStrategy
- Returns
the new connector instance
- Rtype
rsb.transport.OutConnector
-
property
name¶ Return the name representing this transport.
- Returns
name of the transport, non-empty
- Rtype
str
-
property
remote¶ Return
trueif the transport performs remote communication.- Returns
does the transport perform remote communication?
- Rtype
bool
-
-
rsb.transport.local.rsb_initialize()¶
-
rsb.transport.local.global_bus= <rsb.transport.local.Bus object>¶