summaryrefslogtreecommitdiff
path: root/src/leap/common/events/daemon.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-05-28 17:38:30 -0300
committerTomás Touceda <chiiph@leap.se>2013-05-28 17:38:30 -0300
commit205fcd6c6bb8712a115f3dfe738c490f5427e09b (patch)
tree0d824ab1fc1de09fe2136f1419a0a2966225fac4 /src/leap/common/events/daemon.py
parentb7dc270bce885ce5079d86d8e52fd96b8390fc9d (diff)
parent354467c605f07042568c10c3e931f7fc093c0bf4 (diff)
Merge remote-tracking branch 'kali/bug/allow-absolute-paths2' into develop
Diffstat (limited to 'src/leap/common/events/daemon.py')
-rw-r--r--src/leap/common/events/daemon.py40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/leap/common/events/daemon.py b/src/leap/common/events/daemon.py
index d2c7b9b..c253948 100644
--- a/src/leap/common/events/daemon.py
+++ b/src/leap/common/events/daemon.py
@@ -50,10 +50,10 @@ class EventsRpcServer(SocketRpcServer):
"""
Initialize a RPC server.
- @param port: the port in which to listen for incoming messages
- @type port: int
- @param host: the address to bind to
- @type host: str
+ :param port: the port in which to listen for incoming messages
+ :type port: int
+ :param host: the address to bind to
+ :type host: str
"""
SocketRpcServer.__init__(self, port, host)
self._server = None
@@ -111,10 +111,10 @@ class EventsSingletonDaemon(threading.Thread):
This is a static method disguised as instance method that actually
does the initialization of the daemon instance.
- @param port: the port in which to listen for incoming messages
- @type port: int
- @param service: the service to provide in this daemon
- @type service: google.protobuf.service.Service
+ :param port: the port in which to listen for incoming messages
+ :type port: int
+ :param service: the service to provide in this daemon
+ :type service: google.protobuf.service.Service
"""
threading.Thread.__init__(self)
self._port = port
@@ -141,11 +141,11 @@ class EventsSingletonDaemon(threading.Thread):
with the appropriate service from the `events.proto` definitions, and
return the daemon instance.
- @param port: the port in which the daemon should be listening
- @type port: int
+ :param port: the port in which the daemon should be listening
+ :type port: int
- @return: a daemon instance
- @rtype: EventsSingletonDaemon
+ :return: a daemon instance
+ :rtype: EventsSingletonDaemon
"""
raise NotImplementedError(self.ensure)
@@ -156,11 +156,11 @@ class EventsSingletonDaemon(threading.Thread):
Might return ServiceAlreadyRunningException
- @param port: the port in which the daemon should be listening
- @type port: int
+ :param port: the port in which the daemon should be listening
+ :type port: int
- @return: a daemon instance
- @rtype: EventsSingletonDaemon
+ :return: a daemon instance
+ :rtype: EventsSingletonDaemon
"""
daemon = cls(port, service)
if not daemon.is_alive():
@@ -178,8 +178,8 @@ class EventsSingletonDaemon(threading.Thread):
"""
Retrieve singleton instance of this daemon.
- @return: a daemon instance
- @rtype: EventsSingletonDaemon
+ :return: a daemon instance
+ :rtype: EventsSingletonDaemon
"""
return cls.__instance
@@ -200,8 +200,8 @@ class EventsSingletonDaemon(threading.Thread):
Retrieve the value of the port to which the service running in this
daemon is binded to.
- @return: the port to which the daemon is binded to
- @rtype: int
+ :return: the port to which the daemon is binded to
+ :rtype: int
"""
if self._port is 0:
self._port = self._server.port