Exemplo n.º 1
0
 def subscribe(self):
   """Subscribe to the global Timer Service"""
   service = getTimerService(self)
   if service:
     service.subscribe(self)
     return "Subscribed to Timer Service"
   return "TimerService not available"
Exemplo n.º 2
0
 def unsubscribe(self):
   """Unsubscribe from the global Timer Service"""
   service = getTimerService(self)
   if service:
     service.unsubscribe(self)
     return "Usubscribed from Timer Service"
   return "TimerService not available"
Exemplo n.º 3
0
 def unsubscribe(self):
     """Unsubscribe from the global Timer Service"""
     service = getTimerService(self)
     if service:
         service.unsubscribe(self)
         return "Usubscribed from Timer Service"
     return "TimerService not available"
Exemplo n.º 4
0
 def subscribe(self):
     """Subscribe to the global Timer Service"""
     service = getTimerService(self)
     if service:
         service.subscribe(self)
         return "Subscribed to Timer Service"
     return "TimerService not available"
Exemplo n.º 5
0
 def unsubscribe(self):
   """
     Unsubscribe from the global Timer Service.
   """
   service = getTimerService(self)
   if not service:
     LOG('AlarmTool', INFO, 'TimerService not available')
     return
   service.unsubscribe(self)
   return "Usubscribed from Timer Service"
Exemplo n.º 6
0
 def subscribe(self):
   """
     Subscribe to the global Timer Service.
   """
   service = getTimerService(self)
   if not service:
     LOG('AlarmTool', INFO, 'TimerService not available')
     return
   service.subscribe(self)
   return "Subscribed to Timer Service"
Exemplo n.º 7
0
  def isSubscribed(self):
    """ return True, if we are subscribed to TimerService.
    Otherwise return False.
    """
    service = getTimerService(self)
    if not service:
      LOG('AlarmTool', INFO, 'TimerService not available')
      return False

    path = '/'.join(self.getPhysicalPath())
    if path in service.lisSubscriptions():
      return True
    return False
Exemplo n.º 8
0
 def isSubscribed(self):
   """Return True if we are subscribed to TimerService, otherwise return False
   """
   service = getTimerService(self)
   return service and \
     '/'.join(self.getPhysicalPath()) in service.lisSubscriptions()
Exemplo n.º 9
0
 def isSubscribed(self):
     """Return True if we are subscribed to TimerService, otherwise return False
 """
     service = getTimerService(self)
     return service and \
       '/'.join(self.getPhysicalPath()) in service.lisSubscriptions()