Nir Soffer has posted comments on this change. Change subject: json-rpc: Protocol detection ......................................................................
Patch Set 22: (1 comment) http://gerrit.ovirt.org/#/c/26300/22/vdsm/protocolDetector.py File vdsm/protocolDetector.py: Line 88: finally: Line 89: for handler in self._handlers: Line 90: handler.stop() Line 91: Line 92: self._json_binding.stop() > There is big difference between xml and json bindings. XML is used only by It seems that this class could not care less about the bindings, and is interested in detectors (unless I don't understand the design). So a possible way to configure this class is: json_bindings = JSONBindings(...) protocl_detector.add_detector(STOMPDetector(json_bindings)) protocl_detector.add_detecto(AMQPDetector(json_bindings)) xml_bindings = XMLBindings(...) protocol_dectector.add_detector(XMLDetector(xml_bindings)) http_bindings = HTTPBindings(...) protocol_dectector.add_detector(HTTPDetector(http_bindings)) Then when application is fully configured, start everything: json_binding.start() xml_binding.start() http_binding.start() protocol_detector.start() And shut down when application is terminating: protocol_detector.stop() http_binding.start() xml_binding.stop() json_binding.stop() Can this work? Line 93: self._poller.unregister(self._socket) Line 94: self._poller.unregister(self._read_fd) Line 95: self._socket.close() Line 96: -- To view, visit http://gerrit.ovirt.org/26300 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id739a40e2b37dcc175137ec91cd5ec166ad24a75 Gerrit-PatchSet: 22 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Piotr Kliczewski <[email protected]> Gerrit-Reviewer: Barak Azulay <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Piotr Kliczewski <[email protected]> Gerrit-Reviewer: Saggi Mizrahi <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: Yeela Kaplan <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
