8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS |
9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS |
10 # FOR A PARTICULAR PURPOSE. |
10 # FOR A PARTICULAR PURPOSE. |
11 # |
11 # |
12 |
12 |
13 __docformat__ = 'restructuredtext' |
13 """PyAMS_zmq.interfaces module |
|
14 |
|
15 This module provides definition of 0MQ process and message handle. |
|
16 """ |
14 |
17 |
15 from zope.interface import Attribute, Interface, implementer |
18 from zope.interface import Attribute, Interface, implementer |
16 from zope.interface.interfaces import IObjectEvent, ObjectEvent |
19 from zope.interface.interfaces import IObjectEvent, ObjectEvent |
|
20 |
|
21 |
|
22 __docformat__ = 'restructuredtext' |
17 |
23 |
18 |
24 |
19 class IZMQProcess(Interface): |
25 class IZMQProcess(Interface): |
20 """ZeroMQ process interface""" |
26 """ZeroMQ process interface""" |
21 |
27 |
22 socket_type = Attribute("Socket type") |
28 socket_type = Attribute("Socket type") |
23 |
29 |
24 def setup(self): |
30 def setup(self): |
25 """Initialize process context and events loop and initialize stream""" |
31 """Initialize process context and events loop and initialize stream""" |
26 |
32 |
|
33 # pylint: disable=too-many-arguments |
27 def stream(self, sock_type, addr, bind, callback=None, subscribe=b''): |
34 def stream(self, sock_type, addr, bind, callback=None, subscribe=b''): |
28 """Create ZMQStream""" |
35 """Create ZMQStream""" |
29 |
36 |
30 def init_stream(self): |
37 def init_stream(self): |
31 """initialize response stream""" |
38 """initialize response stream""" |