读取数据到Buffer

@param handler {@link CompletionHandler}
@return this
334608
public AioSession read(CompletionHandler<Integer, AioSession> handler) {
		if (isOpen()) {
			this.readBuffer.clear();
			this.channel.read(this.readBuffer, Math.max(this.readTimeout, 0L), TimeUnit.MILLISECONDS, this, handler);
		}
		return this;
	}
1321780
public void setImageShapeLoadedHandler(final ImageShapeLoadedHandler<T> handler)
    {
        m_handler = handler;

        if ((null != m_handler) && (m_is_done))
        {
            m_handler.onImageShapeLoaded(m_image);
        }
    }
1060881
public HandlerRegistration setLocationNotFoundHandler(LocationNotFoundHandler handler) {
		if (handlerManager.getHandlerCount(LocationNotFoundHandler.TYPE) > 0) {
			LocationNotFoundHandler previous = handlerManager.getHandler(LocationNotFoundHandler.TYPE, 0);
			handlerManager.removeHandler(LocationNotFoundHandler.TYPE, previous);
		}
		return handlerManager.addHandler(LocationNotFoundHandler.TYPE, handler);
	}
1129900
@Override
    public ReadStream<Buffer> handler(Handler<Buffer> handler) {
        if (handler == null) {
            throw new IllegalArgumentException("handler");
        }
        this.dataHandler = handler;
        doRead();
        return this;
    }
148614
@Override
    public HttpServerRequest handler(Handler<Buffer> handler) {
        handler.handle(context.getBody());
        return this;
    }
152010
def start_completion(self, buffer_name=None, select_first=False,
                         select_last=False, insert_common_part=False,
                         complete_event=None):
        
        buffer_name = buffer_name or self.current_buffer_name
        completer = self._async_completers.get(buffer_name)

        if completer:
            completer(select_first=select_first,
                      select_last=select_last,
                      insert_common_part=insert_common_part,
                      complete_event=CompleteEvent(completion_requested=True))
656560
public <T> void addMessageHandler(Class<T> clazz, Whole<T> handler) {
        connLink.addMessageHandler(clazz, 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 });
	}
370398
@SuppressWarnings("unchecked")
    public <E extends Throwable> 
    ExceptionHandler<? super E> addExceptionHandler(
            Class<E> type, ExceptionHandler<? super E> handler) {
        exceptionHandlerCache.clear();
        return (ExceptionHandler<? super E>) exceptionHandlers.put(type, handler);
    }
845451
public JsHandlerRegistration addGeometryIndexHighlightEndHandler(final GeometryIndexHighlightEndHandler handler) {
		org.geomajas.plugin.editing.client.event.state.GeometryIndexHighlightEndHandler h;
		h = new org.geomajas.plugin.editing.client.event.state.GeometryIndexHighlightEndHandler() {

			public void onGeometryIndexHighlightEnd(GeometryIndexHighlightEndEvent event) {
				org.geomajas.plugin.editing.jsapi.client.event.state.GeometryIndexHighlightEndEvent e;
				List<GeometryIndex> indices = event.getIndices();
				e = new org.geomajas.plugin.editing.jsapi.client.event.state.GeometryIndexHighlightEndEvent(
						event.getGeometry(), indices.toArray(new GeometryIndex[indices.size()]));
				handler.onGeometryIndexHighlightEnd(e);
			}
		};
		return new JsHandlerRegistration(new HandlerRegistration[] { delegate.addGeometryIndexHighlightEndHandler(h) });
	}
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;
	}
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;
      }
1317399
public void insertHandler(Class<?> restrictionClass, H handler) {
    // note that the handlers list is kept in a list that is traversed in
    // backwards order.
    handlers.add(new Pair<Class<?>, H>(restrictionClass, handler));
  }
207478
public Handler addHandler(Handler handler) throws JettyBootstrapException {
        JettyHandler jettyHandler = new JettyHandler();
        jettyHandler.setHandler(handler);

        handlers.addHandler(handler);

        return handler;
    }
15800
public Grammar register(@NonNull ParserTokenType type, @NonNull PrefixHandler handler) {
      prefixHandlers.put(type, handler);
      return this;
   }
55053
public static <V> CompletionHandler<V, Void> createAsyncHandler(final Consumer<V> success, final Consumer<Throwable> fail) {
        return new CompletionHandler<V, Void>() {
            @Override
            public void completed(V result, Void attachment) {
                if (success != null) success.accept(result);
            }

            @Override
            public void failed(Throwable exc, Void attachment) {
                if (fail != null) fail.accept(exc);
            }
        };
    }
741797
public RouteMatcher trace(String pattern, Handler<HttpServerRequest> handler) {
		addPattern(pattern, handler, traceBindings);
		return this;
	}