写数据到目标端

@param handler {@link CompletionHandler}
@return this
348011
public AioSession write(ByteBuffer data, CompletionHandler<Integer, AioSession> handler) {
		this.channel.write(data, Math.max(this.writeTimeout, 0L), TimeUnit.MILLISECONDS, this, handler);
		return this;
	}
27240
public void addMapHandler(AbstractGeometryIndexMapHandler handler) {
		handler.setIndex(index);
		handler.setService(service);
		handler.setEventParser(this);
		if (handler instanceof MapDownHandler) {
			downHandlers.add((MapDownHandler) handler);
		}
		if (handler instanceof MapUpHandler) {
			upHandlers.add((MapUpHandler) handler);
		}
		if (handler instanceof MapDragHandler) {
			dragHandlers.add((MapDragHandler) handler);
		}
		if (handler instanceof MouseOverHandler) {
			overHandlers.add((MouseOverHandler) handler);
		}
		if (handler instanceof MouseOutHandler) {
			outHandlers.add((MouseOutHandler) handler);
		}
		if (handler instanceof MouseMoveHandler) {
			moveHandlers.add((MouseMoveHandler) handler);
		}
		if (handler instanceof DoubleClickHandler) {
			doubleClickHandlers.add((DoubleClickHandler) handler);
		}
	}
447935
public static void replaceDefaultHandler(Handler handler) {
    Logger rootlogger = LogManager.getLogManager().getLogger("");
    for(Handler h : rootlogger.getHandlers()) {
      if(h instanceof CLISmartHandler) {
        rootlogger.removeHandler(h);
      }
    }
    addHandler(handler);
  }
1363075
public SimpleUriRouter<I, O> addUri(String uri, RequestHandler<I, O> handler) {
        routes.add(new Route(new ServletStyleUriConstraintKey<I>(uri, ""), handler));
        return this;
    }
207478
public Handler addHandler(Handler handler) throws JettyBootstrapException {
        JettyHandler jettyHandler = new JettyHandler();
        jettyHandler.setHandler(handler);

        handlers.addHandler(handler);

        return handler;
    }
1165774
@Export
	public JsHandlerRegistration addDispatchStoppedHandler(final DispatchStoppedHandler handler) {
		HandlerRegistration registration = GwtCommandDispatcher.getInstance().addDispatchStoppedHandler(
				new org.geomajas.gwt.client.command.event.DispatchStoppedHandler() {

					public void onDispatchStopped(DispatchStoppedEvent event) {
						handler.onDispatchStopped(new org.geomajas.plugin.jsapi.client.event.DispatchStoppedEvent());
					}
				});
		return new JsHandlerRegistration(new HandlerRegistration[] { registration });
	}
261579
public static void head(@NotNull String path, @NotNull Handler handler) {
        staticInstance().head(prefixPath(path), 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) });
	}
155856
ManagementRequestHandler<Void, Void> getCloseHandler() {
        return new AbstractAttachmentHandler() {
            @Override
            void handleRequest(TimedStreamEntry entry, FlushableDataOutput output) throws IOException {
                // no-op as AbstractAttachmentHandler will close the entry after calling this
            }

            @Override
            void handleMissingStream(int requestId, int index, FlushableDataOutput output) throws IOException {
                // no-op as there's nothing to do
            }
        };
    }
1321780
public void setImageShapeLoadedHandler(final ImageShapeLoadedHandler<T> handler)
    {
        m_handler = handler;

        if ((null != m_handler) && (m_is_done))
        {
            m_handler.onImageShapeLoaded(m_image);
        }
    }
736265
public Javalin after(@NotNull String path, @NotNull Handler handler) {
        return addHandler(HandlerType.AFTER, path, 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 });
	}
1344478
@Nonnull
	public final LLongSupplierBuilder withHandling(@Nonnull HandlingInstructions<RuntimeException, RuntimeException> handling) {
		Null.nonNullArg(handling, "handling");
		if (this.handling != null) {
			throw new UnsupportedOperationException("Handling is already set for this builder.");
		}
		this.handling = handling;
		return self();
	}
317092
function(handler, priority) {
        if(handler && handler.constructor === Array) {
          handler.forEach(function(layer) {
            layer.priority = typeof layer.priority === 'undefined' ? 1 : layer.priority;
          });
          _list = _list.concat(handler);
        } else {
          handler.priority = priority || (typeof handler.priority === 'undefined' ? 1 : handler.priority);
          _list.push(handler);
        }
        return this;
      }
762152
@Override
    public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return ensureHandlers().addHandler(BlurEvent.getType(), handler);
    }
521402
public List<CompletionProposal> complete(CompletionContext context) {

		String prefix = context.upToCursor();

		List<CompletionProposal> candidates = new ArrayList<>();
		candidates.addAll(commandsStartingWith(prefix));

		String best = findLongestCommand(prefix);
		if (best != null) {
			CompletionContext argsContext = context.drop(best.split(" ").length);
			// Try to complete arguments
			MethodTarget methodTarget = methodTargets.get(best);
			Method method = methodTarget.getMethod();

			List<MethodParameter> parameters = Utils.createMethodParameters(method).collect(Collectors.toList());
			for (ParameterResolver resolver : parameterResolvers) {
				for (int index = 0; index < parameters.size(); index++) {
					MethodParameter parameter = parameters.get(index);
					if (resolver.supports(parameter)) {
						resolver.complete(parameter, argsContext).stream().forEach(candidates::add);
					}
				}
			}
		}
		return candidates;
	}
519024
public HandlerRegistration addChangedHandler(final ChangedHandler handler) {
		return enabledForm.addItemChangedHandler(new ItemChangedHandler() {

			public void onItemChanged(ItemChangedEvent event) {
				handler.onChanged(new ChangedEvent(EnableToggleFormItem.this.getJsObj()));
			}
		});

	}