rad  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
rad.services.pubsub.ZmqSubscriber Class Reference

Subscriber provides the capability to subscribe to protobuf ZMQ topics and being notified through callbacks to a (shared for all topics) handler. More...

Public Member Functions

def __init__
 
def is_closed
 Returns true if subscriber is not running, false otherwise. More...
 
def start
 Start reading from socket. More...
 
def stop
 Unbinds socket and shuts down all related tasks to this Replier. More...
 
def connect
 Connect to endpoint. More...
 
def disconnect
 Disconnect from endpoint. More...
 
def subscribe
 Subscribe on the topic topic_name. More...
 
def unsubscribe
 Unsubscribe to topic identified by topic_name. More...
 
def __init__
 
def is_closed
 Returns true if subscriber is not running, false otherwise. More...
 
def start
 Start reading from socket. More...
 
def stop
 Unbinds socket and shuts down all related tasks to this Replier. More...
 
def connect
 Connect to endpoint. More...
 
def disconnect
 Disconnect from endpoint. More...
 
def subscribe
 Subscribe on the topic topic_name. More...
 
def unsubscribe
 Unsubscribe to topic identified by topic_name. More...
 

Detailed Description

Subscriber provides the capability to subscribe to protobuf ZMQ topics and being notified through callbacks to a (shared for all topics) handler.

Constructor & Destructor Documentation

def rad.services.pubsub.ZmqSubscriber.__init__ (   self,
  zmq_ctx 
)
def rad.services.pubsub.ZmqSubscriber.__init__ (   self,
  zmq_ctx 
)

Member Function Documentation

def rad.services.pubsub.ZmqSubscriber.connect (   self,
  endpoint 
)

Connect to endpoint.

def rad.services.pubsub.ZmqSubscriber.connect (   self,
  endpoint 
)

Connect to endpoint.

def rad.services.pubsub.ZmqSubscriber.disconnect (   self,
  endpoint 
)

Disconnect from endpoint.

def rad.services.pubsub.ZmqSubscriber.disconnect (   self,
  endpoint 
)

Disconnect from endpoint.

def rad.services.pubsub.ZmqSubscriber.is_closed (   self,
  bool 
)

Returns true if subscriber is not running, false otherwise.

def rad.services.pubsub.ZmqSubscriber.is_closed (   self,
  bool 
)

Returns true if subscriber is not running, false otherwise.

def rad.services.pubsub.ZmqSubscriber.start (   self)

Start reading from socket.

Todo:
: Return future instead?
Returns
Coroutine. The ZMQ socket reader coro that needs to be awaited on.
def rad.services.pubsub.ZmqSubscriber.start (   self)

Start reading from socket.

Todo:
: Return future instead?
Returns
Coroutine. The ZMQ socket reader coro that needs to be awaited on.
def rad.services.pubsub.ZmqSubscriber.stop (   self)

Unbinds socket and shuts down all related tasks to this Replier.

   The ZmqMsgReplier is essentially dead after this.
Returns
Future that resolves once server has been closed.
def rad.services.pubsub.ZmqSubscriber.stop (   self)

Unbinds socket and shuts down all related tasks to this Replier.

   The ZmqMsgReplier is essentially dead after this.
Returns
Future that resolves once server has been closed.
def rad.services.pubsub.ZmqSubscriber.subscribe (   self,
  topic_name 
)

Subscribe on the topic topic_name.

Note
ZMQ topic filtering is done simply on the start of the string, subscribing to 'foo' will match the published topic 'foobar'.
Params
topic_name Topic name (str or bytes).
def rad.services.pubsub.ZmqSubscriber.subscribe (   self,
  topic_name 
)

Subscribe on the topic topic_name.

Note
ZMQ topic filtering is done simply on the start of the string, subscribing to 'foo' will match the published topic 'foobar'.
Params
topic_name Topic name (str or bytes).
def rad.services.pubsub.ZmqSubscriber.unsubscribe (   self,
  topic_name 
)

Unsubscribe to topic identified by topic_name.

def rad.services.pubsub.ZmqSubscriber.unsubscribe (   self,
  topic_name 
)

Unsubscribe to topic identified by topic_name.


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