def get_coders(self): """ Return the filtered coders on this transport can be a subset of the total in the system. """ coders = {} for coder in message_coder_factory.get_prio_list(): coders[coder] = message_coder_factory.get(coder) return coders
def get_coders(self): """ Return the filtered coders on this transport can be a subset of the total in the system. """ coders = {} for coder in message_coder_factory.get_prio_list(): coders[coder] = message_coder_factory.get(coder) return coders
def get_coder(self, prio_list): available_coders = message_coder_factory.get_prio_list() if prio_list: # pick first common coder coder = [c for c in prio_list if c in available_coders][0] else: # Available is in order of priority coder = available_coders[0] if not coder: # No coder found, i.e. at least one list was empty (should never happen) _log.warning("No available coder found, using json") coder = "json" return message_coder_factory.get(coder)
def get_coder(self, prio_list): available_coders = message_coder_factory.get_prio_list() if prio_list: # pick first common coder coder = [c for c in prio_list if c in available_coders ][0] else : # Available is in order of priority coder = available_coders[0] if not coder : # No coder found, i.e. at least one list was empty (should never happen) _log.warning("No available coder found, using json") coder = "json" return message_coder_factory.get(coder)
def get_coders_prio(self): """ Return priority list of coders for this runtime """ return message_coder_factory.get_prio_list()
def get_list(self): return message_coder_factory.get_prio_list()
def get_list(self): return message_coder_factory.get_prio_list()