Register this {@code Channel} on its {@link EventLoop}.
546049
public void register() throws Exception {
        ChannelFuture future = loop.register(this);
        assert future.isDone();
        Throwable cause = future.cause();
        if (cause != null) {
            PlatformDependent.throwException(cause);
        }
    }
1321951
def on_channel_open(self, channel):
        
        self._logger.debug('Channel opened')
        self._channel = channel
        self._channel.parent_client = self
        self.add_on_channel_close_callback()
        self.setup_exchange(self._exchange)
710876
public static synchronized void putChannel(WonderPushChannel channel) {
        try {
            if (_putChannel(channel)) {
                save();
            }
        } catch (Exception ex) {
            Log.e(WonderPush.TAG, "Unexpected error while putting channel " + channel, ex);
        }
    }
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);
        }
    }
103041
public void register() {
        routes.values().forEach(route -> logAddRoute(log, route));
        hooks.values().stream().flatMap(Collection::stream).forEach(route -> logAddRoute(log, route));

        Stream.of(routes.values(), hooks.values().stream().findAny().orElse(new ArrayList<>()))
                .flatMap(Collection::stream).forEach(this::registerRoute);

        regexMapping.register();

        webSockets.keySet().forEach(path -> logWebSocket(log, path));
    }
1157346
@Override
    public <T extends Event<?>> T add(T event, Channel... channels) {
        ((EventBase<?>) event).generatedBy(newEventsParent.get());
        ((EventBase<?>) event).processedBy(this);
        synchronized (queue) {
            queue.add(event, channels);
        }
        if (isRunning) {
            return event;
        }
        isRunning = true;
        GeneratorRegistry.instance().add(this);
        run();
        isRunning = false;
        return event;
    }
406256
void add(AbstractEpollChannel ch) throws IOException {
        assert inEventLoop();
        int fd = ch.socket.intValue();
        Native.epollCtlAdd(epollFd.intValue(), fd, ch.flags);
        channels.put(fd, ch);
    }
611635
public void add(Collection<AlertChannel> channels)
    {
        for(AlertChannel channel : channels)
            this.channels.put(channel.getId(), channel);
    }
1230913
public void init(VirtualConnection inVC, HttpInboundChannel channel) {

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Init on link: " + this + " " + inVC);
        }
        super.init(inVC);
        this.myChannel = channel;
        if (null != getHTTPContext()) {
            getHTTPContext().setHttpConfig(channel.getHttpConfig());
        }

        getVirtualConnection().getStateMap().put(CallbackIDs.CALLBACK_HTTPICL, this);
        this.bIsActive = true;
    }
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;
	}
1103369
@Override
    public <T> Event<T> fire(Event<T> event, Channel... channels) {
        if (channels.length == 0) {
            channels = event.channels();
            if (channels.length == 0) {
                channels = new Channel[] { channel() };
            }
        }
        event.setChannels(channels);
        tree().fire(event, channels);
        return event;
    }
367364
public SC registerServletContextListener(Class<? extends ServletContextListener> servletContextListener) {
        __throwIfInitialized();

        if (servletContextListener == null)
            throw new IllegalArgumentException("Event listener cannot be null");

        servletContextListenerSet.add(servletContextListener);

        return (SC) this;
    }
510516
public void init(VirtualConnection inVC, HttpOutboundChannel channel) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Init on link: " + this + " " + inVC);
        }
        super.init(inVC);
        this.myChannel = channel;
        this.bIsActive = true;
        setEnableReconnect(this.myChannel.getHttpConfig().allowsRetries());
        setAllowReconnect(true);
    }
787523
public T open(RequestChannel channel)
    {
        return clientManager.createClient(channel, clientType, clientName, eventHandlers);
    }
918413
public static void registerListener(ListenerInfo information) {
        if (isServiceLoaderDisabled()) {
            // Donot even attempt register any listeners if the user doesnt want them to be managed.
            return;
        }
        logger.entering(information);
        listenerMap.put(information.getListenerClassName(), information);
    }
1341272
private void registerChannel(Selector selector, SelectableChannel channel, Operation ops) {
		if (channel == null) {
			return;
		}

		try {
			channel.configureBlocking(false);
			// 注册通道
			channel.register(selector, ops.getValue());
		} catch (IOException e) {
			throw new IORuntimeException(e);
		}
	}
987712
def register(self, event, callable, priority=10):
        """"""
        logger.debug('registered: ' + event + ': ' + repr(callable) + ' [' + repr(self) + ']')
        return EventReceiver(event, callable, manager=self, priority=priority)