Register a {@link GeometryMergeAddedHandler} to listen to events that signal a geometry has been added to the
list for merging.

@param handler
The {@link GeometryMergeAddedHandler} to add as listener.
@return The registration of the handler.
777915
public JsHandlerRegistration addGeometryMergeAddedHandler(final GeometryMergeAddedHandler handler) {
		org.geomajas.plugin.editing.client.merge.event.GeometryMergeAddedHandler h;
		h = new org.geomajas.plugin.editing.client.merge.event.GeometryMergeAddedHandler() {

			public void onGeometryMergingAdded(GeometryMergeAddedEvent event) {
				org.geomajas.plugin.editing.jsapi.client.merge.event.GeometryMergeAddedEvent e;
				e = new org.geomajas.plugin.editing.jsapi.client.merge.event.GeometryMergeAddedEvent(
						event.getGeometry());
				handler.onGeometryMergeAdded(e);
			}
		};
		HandlerRegistration registration = delegate.addGeometryMergeAddedHandler(h);
		return new JsHandlerRegistration(new HandlerRegistration[] { registration });
	}
422969
public void registerHardwareCapability(final RegisterHardwareCapabilityHandler handler){
        HMSAgentLog.i("registerHardwareCapability: handler=" + StrUtils.objDesc(handler));
        this.handler = handler;
        this.retryTimes = MAX_RETRY_TIMES;
        connect();
    }
761182
@Override
  public void registerErrorHandler(final EventHandler<Exception> handler) {
    this.clientEventListener.registerErrorHandler(handler);
    this.serverEventListener.registerErrorHandler(handler);
  }
1254452
private static void registerMiddlewareHandler(Object handler) {
		if(handler instanceof MiddlewareHandler) {
			// register the middleware handler if it is enabled.
			if(((MiddlewareHandler) handler).isEnabled()) {
				((MiddlewareHandler) handler).register();
			}
		}
	}
900307
def _registerHandler(self, handler):
        
        self._logger.addHandler(handler)
        self._handlers.append(handler)
873251
@Nonnull
  public final HandlerRegistration addCloseHandler( @Nonnull final CloseEvent.Handler handler )
  {
    return _eventBus.addHandler( CloseEvent.getType(), handler );
  }
872349
public JsHandlerRegistration addGeometryEditResumeHandler(final GeometryEditResumeHandler handler) {
		org.geomajas.plugin.editing.client.event.GeometryEditResumeHandler h;
		h = new org.geomajas.plugin.editing.client.event.GeometryEditResumeHandler() {

			public void onGeometryEditResume(GeometryEditResumeEvent event) {
				handler.onGeometryEditResume(new org.geomajas.plugin.editing.jsapi.client.event.GeometryEditResumeEvent(
						event.getGeometry()));
			}
		};
		return new JsHandlerRegistration(new HandlerRegistration[] { delegate.addGeometryEditResumeHandler(h) });
	}
445573
public JsHandlerRegistration addGeometryEditMoveHandler(final GeometryEditMoveHandler handler) {
		org.geomajas.plugin.editing.client.event.GeometryEditMoveHandler h;
		h = new org.geomajas.plugin.editing.client.event.GeometryEditMoveHandler() {

			public void onGeometryEditMove(GeometryEditMoveEvent event) {
				List<GeometryIndex> indices = event.getIndices();
				handler.onGeometryEditMove(new org.geomajas.plugin.editing.jsapi.client.event.GeometryEditMoveEvent(
						event.getGeometry(), indices.toArray(new GeometryIndex[indices.size()])));
			}
		};
		HandlerRegistration registration = delegate.addGeometryEditMoveHandler(h);
		return new JsHandlerRegistration(new HandlerRegistration[] { registration });
	}
1118681
public void attach(ElementHandler<T> handler) {
    	NodeState<T> state = buildState();
    	context.addElementHandler(state, handler);
    }
718899
public void register(final Object listener) {
		for (Class clazz = listener.getClass(); clazz != null; clazz = clazz.getSuperclass()) {
			Method[] methods = clazz.getMethods();
			for (Method m : methods) {
				if (!m.isAnnotationPresent(Subscribe.class)) continue;
				Class[] params = m.getParameterTypes();

				if (params.length != 1)
					throw new IllegalArgumentException("Method " + m + " has @Subscribe annotation" +
							"and requires " + params.length +
							" arguments, but event-handling methods must require just one argument");
				Class event = params[0];
				EventHandler handler = new EventHandler(listener, m);
				this.handlersByEventType.put(event, handler);
			}
		}
	}
810358
private void addHandler(Object handler)
    {
        // Would be nice to have a better way to do this,
        // but the type information isn't preserved in the XML format anymore -
        // and the number of types of handler is pretty unlikely to change, so this list
        // won't have to be added to often, if at all.
        if (handler == null)
            return;

        if (handler instanceof IVideoProducer)
            addVideoProducer((IVideoProducer)handler);
        else if (handler instanceof IAudioProducer)
            addAudioProducer((IAudioProducer)handler);
        else if (handler instanceof ICommandHandler)
            addCommandHandler((ICommandHandler)handler);
        else if (handler instanceof IObservationProducer)
            addObservationProducer((IObservationProducer)handler);
        else if (handler instanceof IRewardProducer)
            addRewardProducer((IRewardProducer)handler);
        else if (handler instanceof IWorldGenerator)
            addWorldGenerator((IWorldGenerator)handler);
        else if (handler instanceof IWorldDecorator)
            addWorldDecorator((IWorldDecorator)handler);
        else if (handler instanceof IWantToQuit)
            addQuitProducer((IWantToQuit)handler);
        else
            this.failedHandlers += handler.getClass().getSimpleName() + " isn't of a recognised handler type.\n";
    }
1000286
@Export
	public JsHandlerRegistration addDispatchStartedHandler(final DispatchStartedHandler handler) {
		HandlerRegistration registration = GwtCommandDispatcher.getInstance().addDispatchStartedHandler(
				new org.geomajas.gwt.client.command.event.DispatchStartedHandler() {

					public void onDispatchStarted(DispatchStartedEvent event) {
						handler.onDispatchStarted(new org.geomajas.plugin.jsapi.client.event.DispatchStartedEvent());
					}
				});
		return new JsHandlerRegistration(new HandlerRegistration[] { registration });
	}
629164
public SendGridContentHandler register(final Class<? extends Content> clazz, final SendGridContentHandler handler) {
		if (handler == null) {
			throw new IllegalArgumentException("[handler] cannot be null");
		}
		if (clazz == null) {
			throw new IllegalArgumentException("[clazz] cannot be null");
		}

		LOG.debug("Registering content handler {} for content type {}", handler, clazz);
		return handlers.put(clazz, handler);
	}
77716
public JsHandlerRegistration addGeometryIndexSelectedHandler(final GeometryIndexSelectedHandler handler) {
		org.geomajas.plugin.editing.client.event.state.GeometryIndexSelectedHandler h;
		h = new org.geomajas.plugin.editing.client.event.state.GeometryIndexSelectedHandler() {

			public void onGeometryIndexSelected(GeometryIndexSelectedEvent event) {
				org.geomajas.plugin.editing.jsapi.client.event.state.GeometryIndexSelectedEvent e;
				List<GeometryIndex> indices = event.getIndices();
				e = new org.geomajas.plugin.editing.jsapi.client.event.state.GeometryIndexSelectedEvent(
						event.getGeometry(), indices.toArray(new GeometryIndex[indices.size()]));
				handler.onGeometryIndexSelected(e);
			}
		};
		return new JsHandlerRegistration(new HandlerRegistration[] { delegate.addGeometryIndexSelectedHandler(h) });
	}
904845
public <H extends EventHandler> HandlerRegistration addHandler(GwtEvent.Type<H> type, final H handler) {
		if (type != null && handler != null) {
			return new LegacyHandlerWrapper(this.eventBus.addHandler(type, handler));
		}
		return null;
	}
533453
public void addHandler(AbstractHandler handler) {
    HandlerList handlers = new HandlerList();
    handlers.addHandler(handler);
    for (Handler h : mServer.getHandlers()) {
      handlers.addHandler(h);
    }
    mServer.setHandler(handlers);
  }
621285
public JsHandlerRegistration addGeometryEditStopHandler(final GeometryEditStopHandler handler) {
		org.geomajas.plugin.editing.client.event.GeometryEditStopHandler h;
		h = new org.geomajas.plugin.editing.client.event.GeometryEditStopHandler() {

			public void onGeometryEditStop(GeometryEditStopEvent event) {
				handler.onGeometryEditStop(new org.geomajas.plugin.editing.jsapi.client.event.GeometryEditStopEvent(
						event.getGeometry()));
			}
		};
		return new JsHandlerRegistration(new HandlerRegistration[] { delegate.addGeometryEditStopHandler(h) });
	}