本文整理了Java中io.vertx.ext.web.Router.handle
方法的一些代码示例,展示了Router.handle
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Router.handle
方法的具体详情如下:
包路径:io.vertx.ext.web.Router
类名称:Router
方法名:handle
[英]Used to route a context to the router. Used for sub-routers. You wouldn't normally call this method directly.
[中]用于将上下文路由到路由器。用于子路由器。通常不会直接调用此方法。
代码示例来源:origin: vert-x3/vertx-web
/**
* This method is used to provide a request to the router. Usually you take request from the
* {@link io.vertx.core.http.HttpServer#requestHandler(Handler)} and pass it to this method. The
* router then routes it to matching routes.
*
* This method is now deprecated you can use this object directly as a request handler, which
* means there is no need for a method reference anymore.
*
* @param request the request
* @deprecated
*/
@Deprecated
default void accept(HttpServerRequest request) {
handle(request);
}
代码示例来源:origin: vert-x3/vertx-web
when(request.response()).thenReturn(response);
when(response.ended()).thenReturn(true);
router.handle(request);
future.complete();
}, asyncResult -> {
代码示例来源:origin: io.vertx/vertx-web
/**
* This method is used to provide a request to the router. Usually you take request from the
* {@link io.vertx.core.http.HttpServer#requestHandler(Handler)} and pass it to this method. The
* router then routes it to matching routes.
*
* This method is now deprecated you can use this object directly as a request handler, which
* means there is no need for a method reference anymore.
*
* @param request the request
* @deprecated
*/
@Deprecated
default void accept(HttpServerRequest request) {
handle(request);
}
代码示例来源:origin: io.vertx/vertx-rx-java
/**
* Something has happened, so handle it.
* @param event the event to handle
*/
public void handle(io.vertx.rxjava.core.http.HttpServerRequest event) {
delegate.handle(event.getDelegate());
}
代码示例来源:origin: vert-x3/vertx-rx
/**
* Something has happened, so handle it.
* @param event the event to handle
*/
public void handle(io.vertx.rxjava.core.http.HttpServerRequest event) {
delegate.handle(event.getDelegate());
}
代码示例来源:origin: io.vertx/vertx-web
when(request.response()).thenReturn(response);
when(response.ended()).thenReturn(true);
router.handle(request);
future.complete();
}, asyncResult -> {
内容来源于网络,如有侵权,请联系作者删除!