code: public void setListener(T listener) {
  		Assert.notNull(listener, "Listener must not be null");
  		Assert.isTrue(isSupportedType(listener), "Listener is not of a supported type");
  		this.listener = listener;
  	}
docs: Set the listener that will be registered.
  @param listener the listener to register