Beispiel #1
0
class RouterClient(ApplicationSession):
    def __init__(self, config):
        ApplicationSession.__init__(self, config)
        self.cluster_state = ClusterState(self)

    @inlineCallbacks
    def onJoin(self, details):

        print("Adapter Attached to Router")
        self.cluster_state.init(details)
        CygnusNetworkAdapter.client = self
        CygnusAPI.client = self
        yield self.subscribe(self.cluster_state)

    def leave(self, reason=None, log_message=None):
        self.cluster_state.leave()
        ApplicationSession.leave(self, reason, log_message)

    def disconnect(self):
        ApplicationSession.disconnect(self)
Beispiel #2
0
class RouterClient(ApplicationSession):

    def __init__(self, config):
        ApplicationSession.__init__(self, config)
        self.cluster_state = ClusterState(self)

    @inlineCallbacks
    def onJoin(self, details):

        print("Adapter Attached to Router")
        self.cluster_state.init(details)
        CygnusNetworkAdapter.client = self
        CygnusAPI.client = self
        yield self.subscribe(self.cluster_state)

    def leave(self, reason=None, log_message=None):
        self.cluster_state.leave()
        ApplicationSession.leave(self, reason, log_message)

    def disconnect(self):
        ApplicationSession.disconnect(self)
Beispiel #3
0
 def __init__(self, config):
     ApplicationSession.__init__(self, config)
     self.cluster_state = ClusterState(self)
Beispiel #4
0
 def __init__(self, config):
     ApplicationSession.__init__(self, config)
     self.cluster_state = ClusterState(self)