rsb.transport.rsbspread

This package contains a transport implementation based on the spread toolkit which uses a multicased-based daemon network.

Code author: jmoringe

Code author: jwienke

Functions

initialize()
makeKey(notification)

Classes

Assembly(fragment) A class that maintains a collection of fragments of one fragmented notification and assembles them if all fragments are received.
AssemblyPool() Maintains the parallel joining of notification fragments that are received in an interleaved fashion.
Connector(connection, **kwargs) Superclass for Spread-based connector classes.
InConnector(**kwargs)
OutConnector(**kwargs)
RefCountingSpreadConnection(daemonName[, …])
SpreadConnection(daemonName[, spreadModule]) A wrapper around a spread mailbox for some convenience.
SpreadReceiverTask(mailbox, observerAction, …) Thread used to receive messages from a spread connection.
TransportFactory() TransportFactory implementation for the spread transport.
class rsb.transport.rsbspread.Assembly(fragment)

Bases: object

A class that maintains a collection of fragments of one fragmented notification and assembles them if all fragments are received.

Code author: jwienke

add(fragment)
class rsb.transport.rsbspread.AssemblyPool

Bases: object

Maintains the parallel joining of notification fragments that are received in an interleaved fashion.

Code author: jwienke

add(fragment)
class rsb.transport.rsbspread.Connector(connection, **kwargs)

Bases: rsb.transport.Connector, rsb.transport.ConverterSelectingConnector

Superclass for Spread-based connector classes. This class manages the direction-independent aspects like the Spread connection and (de)activation.

Code author: jwienke

activate()
deactivate()
getConnection()
getConverterForDataType(dataType)

Returns a converter that can convert the supplied data to the wire-type.

Parameters:dataType – the type of the object for which a suitable converter should returned.
Returns:converter
Raises:KeyError – no converter is available for the supplied data.
getConverterForWireSchema(wireSchema)

Returns a suitable converter for the wireSchema.

Parameters:wireSchema (str) – the wire-schema to or from which the returned converter should convert
Returns:converter
Raises:KeyError – no converter is available for the specified wire-schema.
getConverterMap()
getScope()
getTransportURL()
getWireType()

Returns the serialization type used for this connector.

Returns:python serialization type
isActive()
setQualityOfServiceSpec(qos)
setScope(newValue)

Sets the scope this connector will receive events from to newValue. Called before #activate.

Parameters:newValue (rsb.Scope) – scope of the connector
MAX_MSG_LENGTH = 100000
active
connection
converterMap
scope
wireType

Returns the serialization type used for this connector.

Returns:python serialization type
class rsb.transport.rsbspread.InConnector(**kwargs)

Bases: rsb.transport.rsbspread.Connector, rsb.transport.InConnector

activate()
deactivate()
filterNotify(theFilter, action)
getConnection()
getConverterForDataType(dataType)

Returns a converter that can convert the supplied data to the wire-type.

Parameters:dataType – the type of the object for which a suitable converter should returned.
Returns:converter
Raises:KeyError – no converter is available for the supplied data.
getConverterForWireSchema(wireSchema)

Returns a suitable converter for the wireSchema.

Parameters:wireSchema (str) – the wire-schema to or from which the returned converter should convert
Returns:converter
Raises:KeyError – no converter is available for the specified wire-schema.
getConverterMap()
getScope()
getTransportURL()
getWireType()

Returns the serialization type used for this connector.

Returns:python serialization type
isActive()
setObserverAction(observerAction)
setQualityOfServiceSpec(qos)
setScope(scope)
MAX_MSG_LENGTH = 100000
active
connection
converterMap
scope
wireType

Returns the serialization type used for this connector.

Returns:python serialization type
class rsb.transport.rsbspread.OutConnector(**kwargs)

Bases: rsb.transport.rsbspread.Connector, rsb.transport.OutConnector

activate()
deactivate()
getConnection()
getConverterForDataType(dataType)

Returns a converter that can convert the supplied data to the wire-type.

Parameters:dataType – the type of the object for which a suitable converter should returned.
Returns:converter
Raises:KeyError – no converter is available for the supplied data.
getConverterForWireSchema(wireSchema)

Returns a suitable converter for the wireSchema.

Parameters:wireSchema (str) – the wire-schema to or from which the returned converter should convert
Returns:converter
Raises:KeyError – no converter is available for the specified wire-schema.
getConverterMap()
getScope()
getTransportURL()
getWireType()

Returns the serialization type used for this connector.

Returns:python serialization type
handle(event)
isActive()
setQualityOfServiceSpec(qos)
setScope(newValue)

Sets the scope this connector will receive events from to newValue. Called before #activate.

Parameters:newValue (rsb.Scope) – scope of the connector
MAX_MSG_LENGTH = 100000
active
connection
converterMap
scope
wireType

Returns the serialization type used for this connector.

Returns:python serialization type
class rsb.transport.rsbspread.RefCountingSpreadConnection(daemonName, spreadModule=<module 'spread' from '/Users/jenkins/workspace/rsb-manual-0.15/env/lib/python2.7/spread.so'>)

Bases: rsb.transport.rsbspread.SpreadConnection

activate()
deactivate()
getHost()
getPort()
class rsb.transport.rsbspread.SpreadConnection(daemonName, spreadModule=<module 'spread' from '/Users/jenkins/workspace/rsb-manual-0.15/env/lib/python2.7/spread.so'>)

Bases: object

A wrapper around a spread mailbox for some convenience.

Code author: jwienke

activate()
deactivate()
getHost()
getPort()
class rsb.transport.rsbspread.SpreadReceiverTask(mailbox, observerAction, converterMap)

Bases: object

Thread used to receive messages from a spread connection.

Code author: jwienke

Constructor.

Parameters:
  • mailbox – spread mailbox to receive from
  • observerAction – callable to execute if a new event is received
  • converterMap – converters for data
interrupt()
setObserverAction(action)
class rsb.transport.rsbspread.TransportFactory

Bases: rsb.transport.TransportFactory

TransportFactory implementation for the spread transport.

Code author: jwienke

createInPushConnector(converters, options)
createOutConnector(converters, options)
getName()
isRemote()
rsb.transport.rsbspread.initialize()
rsb.transport.rsbspread.makeKey(notification)