示例#1
0
 def __init__(self, handler):
     if not IProtoHandler.implementedBy(handler.__class__) :
         raise TypeError('handler has to implement devicehive.interfaces.IProtoHandler interface.')
     self.handler = handler
     self.handler.factory = self
     self.devices = {}
     self.factories = {}
     self.timestamp = datetime.utcnow()
示例#2
0
 def __init__(self, handler):
     if not IProtoHandler.implementedBy(handler.__class__) :
         raise TypeError('handler has to implement devicehive.interfaces.IProtoHandler interface.')
     self.handler = handler
     self.handler.factory = self
     self.devices = {}
     self.factories = {}
     self.timestamp = datetime.utcnow()
 def __init__(self, handler):
     if not IProtoHandler.implementedBy(handler.__class__):
         raise TypeError(
             'The protocol handler has to conform to IProtoHandler interface.'
         )
     self.handler = handler
     self.handler.factory = self
     self.factory = None
示例#4
0
 def __init__(self, handler):
     """
     @type handler: C{object}
     @param handler: handler has to implement C{IProtoHandler} interface
     """
     self.handler = handler
     if IProtoHandler.implementedBy(self.handler.__class__) :
         self.handler.factory = self
     else :
         raise TypeError('handler should implements IProtoHandler interface')
     self.devices = {}
示例#5
0
 def __init__(self, handler):
     """
     @type handler: C{object}
     @param handler: handler has to implement C{IProtoHandler} interface
     """
     self.handler = handler
     if IProtoHandler.implementedBy(self.handler.__class__):
         self.handler.factory = self
     else:
         raise TypeError('handler should implements IProtoHandler interface')
     self.devices = {}
示例#6
0
 def __init__(self, handler):
     if not IProtoHandler.implementedBy(handler.__class__) :
         raise TypeError('The protocol handler has to conform to IProtoHandler interface.')
     self.handler  = handler
     self.handler.factory = self
     self.factory  = None