Example #1
0
    def __init__(self, daemon, queue, broker, topic, user, password):
	XenBEEProtocolFactory.__init__(self, queue, user, password)
        self.broker_queue = broker
        self.daemon = daemon
        self.__topic = topic
        self.__protocolRemovalTimeout = 60
        self.__clientProtocols = {}
        self.__clientMutex = threading.RLock()

        self.__brokerProtocols = {}
        self.__brokerMutex = threading.RLock()

        self.__instanceProtocols = {}
        self.__instanceMutex = threading.RLock()

	self.instanceManager = daemon.instanceManager
        self.taskManager = daemon.taskManager
        self.cache = daemon.cache
        self.cert = daemon.certificate
        self.ca_cert = daemon.ca_certificate

        self.__cleanupLoop = task.LoopingCall(self.__cleanupOldProtocols)
        self.__cleanupLoop.start(5*60)

        # calana extension
        self.pbroker = None
        self.instance_id = 1
        log.debug("Broker queue: '%s'" % self.broker_queue)
        log.debug("My     queue: '%s'" % self.queue)
Example #2
0
    def __init__(self, id, stomp_user, stomp_pass,
                 certificate, ca_cert, server_queue,
                 protocolFactory=None,
                 protocolFactoryArgs=(),
                 protocolFactoryKwArgs={}):
        XenBEEProtocolFactory.__init__(self,
                                       "/queue/xenbee.client.%s" % (id),
                                       stomp_user, stomp_pass)
        self.protocolFactory = protocolFactory
        self.protocolFactoryArgs = protocolFactoryArgs
        self.protocolFactoryKwArgs = protocolFactoryKwArgs

        self.client_id = id
        self.server_queue = server_queue
        self.cert = certificate
        self.ca_cert = ca_cert
Example #3
0
    def __init__(self, daemon, queue, topic, user, passwrd):
	XenBEEProtocolFactory.__init__(self, queue, user, passwrd)
        self.daemon = daemon
        self.__topic = topic
        self.__protocolRemovalTimeout = 60
        self.__clientProtocols = {}
        self.__clientMutex = threading.RLock()
        
        self.__instanceProtocols = {}
        self.__instanceMutex = threading.RLock()

	self.instanceManager = daemon.instanceManager
        self.taskManager = daemon.taskManager
        self.cache = daemon.cache
        self.cert = daemon.certificate
        self.ca_cert = daemon.ca_certificate

        from twisted.internet import task
        self.__cleanupLoop = task.LoopingCall(self.__cleanupOldProtocols)
        self.__cleanupLoop.start(5*60)
Example #4
0
    def __init__(self, daemon, my_queue, topic, server_queue, user, password):
        log.debug("initializing broker protocol factory: id=%s,user=%s,server=%s" %
                  (my_queue, user, server_queue))

	XenBEEProtocolFactory.__init__(self, my_queue, user, password)
        self.daemon = daemon
        self.__topic = topic
        self.__server_queue = server_queue
        self.__protocolRemovalTimeout = 60
        self.__clientProtocols = {}
        self.__clientMutex = threading.RLock()

        self.__daemonProtocols = {}
        self.__daemonMutex = threading.RLock()

        self.cert = daemon.certificate
        self.ca_cert = daemon.ca_certificate

        self.__jobList = {}
        self.__jobMutex = threading.RLock()

        from twisted.internet import task
        self.__cleanupLoop = task.LoopingCall(self.__cleanupOldProtocols)
        self.__cleanupLoop.start(5*60)