Registers the given handler for the given event class on the given event bus. Factored out
into a method here instead of generated directly in order to simplify the generated code and
save a little space.
196161
protected final <U extends GenericEvent> void bind(
      EventBus eventBus,
      List<HandlerRegistration> registrations,
      Class<U> type,
      GenericEventHandler handler) {
    registrations.add(eventBus.addHandler(GenericEventType.getTypeOf(type), handler));
  }
179986
public void register(EventDefinition eventDefinition, IEventListener listener) {
        if (eventDefinition.getType() == EventDefinition.TYPE_POST) {
            register(listenersPost, eventDefinition, listener, true);
        } else {
            register(listeners, eventDefinition, listener, false);
        }
    }
761182
@Override
  public void registerErrorHandler(final EventHandler<Exception> handler) {
    this.clientEventListener.registerErrorHandler(handler);
    this.serverEventListener.registerErrorHandler(handler);
  }
358387
public synchronized EventScope<T> register(final Class<? extends T> eventClass, final Object receiver,
			final Pattern namePattern) {

		final Method method = this.detectReceiverMethod(receiver, eventClass, namePattern);
		this.registerInternal(receiver, method, eventClass);
		return this;
	}
324183
@Override
    public void registerEvents(String handlerName, List<Map<String, Object>> configuredEvents) throws InvalidConfigurationException {

        if (tc.isDebugEnabled()) {
            Tr.debug(tc, "size of configuredEvents: " + configuredEvents.size());
        }
        if (validateEventsAndOutcomes(handlerName, configuredEvents)) {
            if (!handlerEventsMap.containsKey(handlerName)) {
                handlerEventsMap.put(handlerName, configuredEvents);
            }
            if (tc.isDebugEnabled()) {
                Tr.debug(tc, "handlerEventsMap: " + handlerEventsMap.toString());
            }

            auditStarted("AuditService");

            if (handlerEventsMap.isEmpty() || handlerEventsMap.containsKey(AUDIT_FILE_HANDLER_NAME)) {
                AuditMgmtEvent av = new AuditMgmtEvent(thisConfiguration, "AuditHandler:" + AUDIT_FILE_HANDLER_NAME, "start");
                sendEvent(av);
            }

        } else {
            throw new InvalidConfigurationException();
        }

    }
943694
static void register(Class<? extends URLStreamHandler> handlerClass) {
    checkArgument("Handler".equals(handlerClass.getSimpleName()));

    String pkg = handlerClass.getPackage().getName();
    int lastDot = pkg.lastIndexOf('.');
    checkArgument(lastDot > 0, "package for Handler (%s) must have a parent package", pkg);

    String parentPackage = pkg.substring(0, lastDot);

    String packages = System.getProperty(JAVA_PROTOCOL_HANDLER_PACKAGES);
    if (packages == null) {
      packages = parentPackage;
    } else {
      packages += "|" + parentPackage;
    }
    System.setProperty(JAVA_PROTOCOL_HANDLER_PACKAGES, packages);
  }
110697
@Nonnull
  public final HandlerRegistration addMessageHandler( @Nonnull final MessageEvent.Handler handler )
  {
    return _eventBus.addHandler( MessageEvent.getType(), handler );
  }
531427
protected <E extends Event> Listener subscribeSystemEvent(Class<E> eventClass, final Class<? extends Listener<E>> listenerClass) {
        Listener<E> listener = locator.createAndInitialize(listenerClass);
        SystemEventBus.subscribe(eventClass, listener);
        return listener;
    }
987712
def register(self, event, callable, priority=10):
        """"""
        logger.debug('registered: ' + event + ': ' + repr(callable) + ' [' + repr(self) + ']')
        return EventReceiver(event, callable, manager=self, priority=priority)
753275
def register(self, event, fn):
        

        # TODO: Can we check the method signature?
        self._handler_dict.setdefault(event, [])
        if fn not in self._handler_dict[event]:
            self._handler_dict[event].append(fn)
464412
@Nonnull
  public final HandlerRegistration addOpenHandler( @Nonnull final OpenEvent.Handler handler )
  {
    return _eventBus.addHandler( OpenEvent.getType(), handler );
  }
497942
protected void addANYHandler(final EventHandler eventHandler)
	{
		final int eventType = eventHandler.getEventType();
		if (eventType != Events.ANY)
		{
			LOG.error("The incoming handler {} is not of type ANY",
					eventHandler);
			throw new IllegalArgumentException(
					"The incoming handler is not of type ANY");
		}
		anyHandler.add(eventHandler);
		Callback<List<Event>> eventCallback = createEventCallbackForHandler(eventHandler);
		BatchSubscriber<Event> batchEventSubscriber = new BatchSubscriber<Event>(
				fiber, eventCallback, 0, TimeUnit.MILLISECONDS);
		Disposable disposable = eventQueue.subscribe(batchEventSubscriber);
		disposableHandlerMap.put(eventHandler, disposable);
	}
880462
private String registerEventHandler(GFXEventHandler h) {
        //checkInitialized();
        if (!registeredOnJS) {
            JSObject doc = (JSObject) runtime.execute("document");
            doc.setMember("jsHandlers", jsHandlers);
            registeredOnJS = true;
        }
        return jsHandlers.registerHandler(h);
    }
58577
def register_event(cls, event_name, event, method):
        
        log.info('@Registry.register_event `{}` with subscriber `{}`'
                 .format(event_name, method.__name__))

        if event_name not in cls._events:
            cls._events[event_name] = {}

        if event not in cls._events[event_name]:
            cls._events[event_name][event] = []

        cls._events[event_name][event].append(method)
1337972
def _RegisterFlowProcessingHandler(self, handler):
    """"""
    self.flow_handler_stop = False
    self.flow_handler_thread = threading.Thread(
        name="flow_processing_handler",
        target=self._HandleFlowProcessingRequestLoop,
        args=(handler,))
    self.flow_handler_thread.daemon = True
    self.flow_handler_thread.start()
1212435
protected void enqueueEvent(Object event, EventHandler handler) {
    eventsToDispatch.get().offer(new EventWithHandler(event, handler));
  }
1347688
@Handler(channels = Self.class)
    public void onRegistered(NioRegistration.Completed event)
            throws InterruptedException, IOException {
        NioHandler handler = event.event().handler();
        if (!(handler instanceof TcpChannelImpl)) {
            return;
        }
        if (event.event().get() == null) {
            fire(new Error(event, "Registration failed, no NioDispatcher?",
                new Throwable()));
            return;
        }
        TcpChannelImpl channel = (TcpChannelImpl) handler;
        channel.registrationComplete(event.event());
        channel.downPipeline()
            .fire(new Connected(channel.nioChannel().getLocalAddress(),
                channel.nioChannel().getRemoteAddress()), channel);
    }