コード例 #1
0
ファイル: component.py プロジェクト: exratione/thywill-python
    def create_client_configuration(self, uuid):
        '''
        Return information to pass to the client so it can configure its expectations accordingly.
        This is built from the input of various components in the thywill system, and the provided
        additional_parameters.
        
        :Parameters:
            - uuid: a string ID for this client
            
        :Return:
            ClientConfiguration object
        '''

        # create a client configuration object. The additional parameters
        # dictionary is used to add in the uuid for a specific client.
        config = DjangoClientConfiguration(uuid)

        # add data from this component
        self._bootstrap_client(uuid, config)

        # add data from the other components; ordering should be such that
        # the application interface component is last, as that gives it a chance
        # to see what else is set.
        LogComponent.factory()._bootstrap_client(uuid, config)
        PushComponent.factory()._bootstrap_client(uuid, config)
        DatabaseComponent.factory()._bootstrap_client(uuid, config)
        ApplicationInterfaceComponent.factory()._bootstrap_client(uuid, config)

        return config
コード例 #2
0
ファイル: component.py プロジェクト: exratione/thywill-python
    def create_client_configuration(self, uuid):
        """
        Return information to pass to the client so it can configure its expectations accordingly.
        This is built from the input of various components in the thywill system, and the provided
        additional_parameters.
        
        :Parameters:
            - uuid: a string ID for this client
            
        :Return:
            ClientConfiguration object
        """

        # create a client configuration object. The additional parameters
        # dictionary is used to add in the uuid for a specific client.
        config = DjangoClientConfiguration(uuid)

        # add data from this component
        self._bootstrap_client(uuid, config)

        # add data from the other components; ordering should be such that
        # the application interface component is last, as that gives it a chance
        # to see what else is set.
        LogComponent.factory()._bootstrap_client(uuid, config)
        PushComponent.factory()._bootstrap_client(uuid, config)
        DatabaseComponent.factory()._bootstrap_client(uuid, config)
        ApplicationInterfaceComponent.factory()._bootstrap_client(uuid, config)

        return config
コード例 #3
0
ファイル: component.py プロジェクト: exratione/thywill-python
 def send_message_to_client(self, uuid, raw_message):
     '''
     Send a message to a specific client.
     '''
     LogComponent.debug(['LocalPythonComponent.send_message_to_client', uuid, raw_message])
     PushComponent.factory().push_raw_message_to_client(uuid, raw_message)