code: public synchronized void setRegistry( MessagingClientFactoryRegistry registry ) {
  
  		if( this.registry != null )
  			this.registry.removeListener(this);
  
  		this.registry = registry;
  		if (registry != null)
  			registry.addListener(this);
  	}
docs: Sets the {@code MessagingClientFactoryRegistry} associated for this client.
  @param registry the {@code MessagingClientFactoryRegistry} for this client.