Create and add model controller handler to an existing management channel handler.

@param handler the channel handler
@return the created client
335809
public static ModelControllerClient createAndAdd(final ManagementChannelHandler handler) {
        final ExistingChannelModelControllerClient client = new ExistingChannelModelControllerClient(handler);
        handler.addHandlerFactory(client);
        return client;
    }
608306
private ChannelHandler channelInitFix(final ChannelHandler handler)
	{
		ChannelHandler fixedHandler=new ShareableChannelInboundHandler() {
			@Override
			public void channelRegistered(ChannelHandlerContext ctx) throws Exception {
				Channel ch=ctx.channel();
				setChannel(ch);
				ctx.pipeline().addLast(handler);
				ctx.pipeline().remove(this);//移除当前handler
				ctx.fireChannelRegistered();//从当前handler往后抛出事件
			}
		};
		return fixedHandler;
	}
1156601
public static <T> ApolloCallback<T> wrap(@NotNull ApolloCall.Callback<T> callback, @NotNull Handler handler) {
    return new ApolloCallback<>(callback, handler);
  }
464412
@Nonnull
  public final HandlerRegistration addOpenHandler( @Nonnull final OpenEvent.Handler handler )
  {
    return _eventBus.addHandler( OpenEvent.getType(), handler );
  }
921711
public JsHandlerRegistration addGeometryIndexEnabledHandler(final GeometryIndexEnabledHandler handler) {
		org.geomajas.plugin.editing.client.event.state.GeometryIndexEnabledHandler h;
		h = new org.geomajas.plugin.editing.client.event.state.GeometryIndexEnabledHandler() {

			public void onGeometryIndexEnabled(GeometryIndexEnabledEvent event) {
				org.geomajas.plugin.editing.jsapi.client.event.state.GeometryIndexEnabledEvent e;
				List<GeometryIndex> indices = event.getIndices();
				e = new org.geomajas.plugin.editing.jsapi.client.event.state.GeometryIndexEnabledEvent(
						event.getGeometry(), indices.toArray(new GeometryIndex[indices.size()]));
				handler.onGeometryIndexEnabled(e);
			}
		};
		return new JsHandlerRegistration(new HandlerRegistration[] { delegate.addGeometryIndexEnabledHandler(h) });
	}
602551
@SuppressWarnings("unchecked")
    public <E> MessageHandler<? super E> addSentMessageHandler(Class<E> type,
            MessageHandler<? super E> handler) {
        sentMessageHandlerCache.clear();
        return (MessageHandler<? super E>) sentMessageHandlers.put(type, handler);
    }
1200725
@Api
	public final HandlerRegistration addMapModelChangedHandler(final MapModelChangedHandler handler) {
		return handlerManager.addHandler(MapModelChangedHandler.TYPE, handler);
	}
1374484
public ServerMethodDefinition<ReqT, RespT> withServerCallHandler(
      ServerCallHandler<ReqT, RespT> handler) {
    return new ServerMethodDefinition<>(method, handler);
  }
603411
public JsHandlerRegistration addLayersModelChangedHandler(final LayersModelChangedHandler handler) {
		HandlerRegistration registration = ((MapImpl) map).getMapWidget().getMapModel()
				.addMapModelChangedHandler(new MapModelChangedHandler() {

					public void onMapModelChanged(MapModelChangedEvent event) {
						handler.onLayersModelChanged(new LayersModelChangedEvent(map.getLayersModel()));
					}
				});
		return new JsHandlerRegistration(new HandlerRegistration[] { registration });
	}
565968
public List<Assignment> enumerateAllModels(final ModelEnumerationHandler handler) {
        return this.enumerateAllModels((Collection<Variable>) null, handler);
    }
584562
private TransportChannelHandler createChannelHandler(Channel channel, RpcHandler rpcHandler) {
    TransportResponseHandler responseHandler = new TransportResponseHandler(channel);
    TransportClient client = new TransportClient(channel, responseHandler);
    TransportRequestHandler requestHandler = new TransportRequestHandler(channel, client,
      rpcHandler, conf.maxChunksBeingTransferred());
    return new TransportChannelHandler(client, responseHandler, requestHandler,
      conf.connectionTimeoutMs(), closeIdleConnections, this);
  }
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;
	}
1363075
public SimpleUriRouter<I, O> addUri(String uri, RequestHandler<I, O> handler) {
        routes.add(new Route(new ServletStyleUriConstraintKey<I>(uri, ""), handler));
        return this;
    }
1118772
public JsHandlerRegistration addGeometryEditRemoveHandler(final GeometryEditRemoveHandler handler) {
		org.geomajas.plugin.editing.client.event.GeometryEditRemoveHandler h;
		h = new org.geomajas.plugin.editing.client.event.GeometryEditRemoveHandler() {

			public void onGeometryEditRemove(GeometryEditRemoveEvent event) {
				List<GeometryIndex> indices = event.getIndices();
				handler.onGeometryEditRemove(new org.geomajas.plugin.editing.jsapi.client.event.GeometryEditRemoveEvent(
						event.getGeometry(), indices.toArray(new GeometryIndex[indices.size()])));
			}
		};
		HandlerRegistration registration = delegate.addGeometryEditRemoveHandler(h);
		return new JsHandlerRegistration(new HandlerRegistration[] { registration });
	}
542413
@Advice.OnMethodExit
	public static void afterGetHandler(@Advice.Return Object handler) {
		SpringMvcRequestNameDeterminerTransformer.setRequestNameByHandler(handler);
	}
942901
@SuppressWarnings("deprecation")
	public static Handler getHandler(List<Handler> handlerList, Handler actionHandler) {
		Handler result = actionHandler;
		
		for (int i=handlerList.size()-1; i>=0; i--) {
			Handler temp = handlerList.get(i);
			temp.next = result;
			temp.nextHandler = result;
			result = temp;
		}
		
		return result;
	}
1112716
public static ProtocolConnectionManager create(final ProtocolConnectionConfiguration configuration, final ConnectionOpenHandler openHandler) {
        return create(new EstablishingConnection(configuration, openHandler));
    }