Beispiel #1
0
 def __init__(self, address, number_threads, ssl=None):
     """Setup all protocol services.
     """
     Singleton.__init__(self)
     self.__address = address
     host, port = self.__address.split(':')
     self.__rpc_server = _protocol.MyServer(
         host, int(port), number_threads, ssl
     )
Beispiel #2
0
    def __init__(self, services, number_threads, ssl=None):
        """Setup all protocol services.
        """
        Singleton.__init__(self)
        self.__services = services

        # XMLRPC
        self.__rpc_server = None
        if 'protocol.xmlrpc' in services:
            host, port = services['protocol.xmlrpc'].split(':')
            self.__rpc_server = _protocol.MyServer(host, int(port),
                                                   number_threads, ssl)

        # MySQL Protocol
        self.__mysql_server = None
        if 'protocol.mysql' in services:
            host, port = services['protocol.mysql'].split(':')
            self.__mysql_server = FabricMySQLServer(host, int(port),
                                                    number_threads, ssl)
Beispiel #3
0
    def __init__(self, services, number_threads, ssl=None):
        """Setup all protocol services.
        """
        Singleton.__init__(self)
        self.__services = services

        # XMLRPC
        self.__rpc_server = None
        if 'protocol.xmlrpc' in services:
            host, port = services['protocol.xmlrpc'].split(':')
            self.__rpc_server = _protocol.MyServer(
                host, int(port), number_threads, ssl
            )

        # MySQL Protocol
        self.__mysql_server = None
        if 'protocol.mysql' in services:
            host, port = services['protocol.mysql'].split(':')
            self.__mysql_server = FabricMySQLServer(
                host, int(port), number_threads, ssl
            )