def _initialize_thrift_service(self): """ Initialize the thrift server. """ mux_processor = TMultiplexedProcessor.TMultiplexedProcessor() for plugin in thrift_services(): self._logger.info("Load thrift services %s (num_threads: %d)", plugin.name, plugin.num_threads) handler = plugin.handler processor = plugin.service.Processor(handler) mux_processor.registerProcessor(plugin.name, processor) self._logger.info( "Initialize SSLSocket using certfile=%s, keyfile=%s, capath=%s" % (SSL_CERT_FILE, SSL_KEY_FILE, CA_PATH)) transport = TSSLSocket.TSSLServerSocket(port=self._config.host_port, certfile=SSL_CERT_FILE, keyfile=SSL_KEY_FILE, capath=CA_PATH, ciphers=SSL_CIPHERS) protocol_factory = TCompactProtocol.TCompactProtocolFactory() server = TNonblockingServer.TNonblockingServer( mux_processor, transport, protocol_factory, protocol_factory, self._config.host_service_threads) self._server = server
def _initialize_thrift_service(self): """ Initialize the thrift server. """ mux_processor = TMultiplexedProcessor.TMultiplexedProcessor() for plugin in thrift_services(): self._logger.info("Load thrift services %s (num_threads: %d)", plugin.name, plugin.num_threads) handler = plugin.handler processor = plugin.service.Processor(handler) mux_processor.registerProcessor(plugin.name, processor) transport = TSocket.TServerSocket(port=self._config.host_port) protocol_factory = TCompactProtocol.TCompactProtocolFactory() server = TNonblockingServer.TNonblockingServer( mux_processor, transport, protocol_factory, protocol_factory, self._config.host_service_threads) self._server = server
def _initialize_thrift_service(self): """ Initialize the thrift server. """ mux_processor = TMultiplexedProcessor.TMultiplexedProcessor() for plugin in thrift_services(): self._logger.info("Load thrift services %s (num_threads: %d)", plugin.name, plugin.num_threads) handler = plugin.handler processor = plugin.service.Processor(handler) mux_processor.registerProcessor(plugin.name, processor) self._logger.info("Initialize SSLSocket using certfile=%s, keyfile=%s, capath=%s" % (SSL_CERT_FILE, SSL_KEY_FILE, CA_PATH)) transport = TSSLSocket.TSSLServerSocket(port=self._config.host_port, certfile=SSL_CERT_FILE, keyfile=SSL_KEY_FILE, capath=CA_PATH, ciphers=SSL_CIPHERS) protocol_factory = TCompactProtocol.TCompactProtocolFactory() server = TNonblockingServer.TNonblockingServer( mux_processor, transport, protocol_factory, protocol_factory, self._config.host_service_threads) self._server = server