def configure(self, target_address, source_address, handler, properties):
self._handler = handler<EOL>self._properties = properties<EOL>dynamic_props = None<EOL>if properties:<EOL><INDENT>dynamic_props = properties.get("<STR_LIT>")<EOL>mode = _dist_modes.get(properties.get("<STR_LIT>"))<EOL>if mode is not None:<EOL><INDENT>self._pn_link.source.distribution_mode = mode<EOL><DEDENT>mode = _snd_settle_modes.get(properties.get("<STR_LIT>"))<EOL>if mode is not None:<EOL><INDENT>self._pn_link.snd_settle_mode = mode<EOL><DEDENT>mode = _rcv_settle_modes.get(properties.get("<STR_LIT>"))<EOL>if mode is not None:<EOL><INDENT>self._pn_link.rcv_settle_mode = mode<EOL><DEDENT><DEDENT>if target_address is None:<EOL><INDENT>if not self._pn_link.is_sender:<EOL><INDENT>raise Exception("<STR_LIT>")<EOL><DEDENT>self._pn_link.target.dynamic = True<EOL>if dynamic_props:<EOL><INDENT>self._pn_link.target.properties.clear()<EOL>self._pn_link.target.properties.put_dict(dynamic_props)<EOL><DEDENT><DEDENT>elif target_address:<EOL><INDENT>self._pn_link.target.address = target_address<EOL><DEDENT>if source_address is None:<EOL><INDENT>if not self._pn_link.is_receiver:<EOL><INDENT>raise Exception("<STR_LIT>")<EOL><DEDENT>self._pn_link.source.dynamic = True<EOL>if dynamic_props:<EOL><INDENT>self._pn_link.source.properties.clear()<EOL>self._pn_link.source.properties.put_dict(dynamic_props)<EOL><DEDENT><DEDENT>elif source_address:<EOL><INDENT>self._pn_link.source.address = source_address<EOL><DEDENT>
Assign addresses, properties, etc.