org.restlet.routing.Router.getNext()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(194)

本文整理了Java中org.restlet.routing.Router.getNext方法的一些代码示例,展示了Router.getNext的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Router.getNext方法的具体详情如下:
包路径:org.restlet.routing.Router
类名称:Router
方法名:getNext

Router.getNext介绍

[英]Returns the next Restlet if available.
[中]返回下一个Restlet(如果可用)。

代码示例

代码示例来源:origin: org.restlet.osgi/org.restlet

@Override
public Restlet getNext(Request request, Response response) {
  Restlet result = super.getNext(request, response);
  if (result == null) {
    getLogger()
        .warning(
            "The protocol used by this request is not declared in the list of client connectors. ("
                + request.getResourceRef()
                    .getSchemeProtocol()
                + "). In case you are using an instance of the Component class, check its \"clients\" property.");
  }
  return result;
}

代码示例来源:origin: org.restlet.osgi/org.restlet

/**
 * Handles a call by invoking the next Restlet if it is available.
 * 
 * @param request
 *            The request to handle.
 * @param response
 *            The response to update.
 */
@Override
public void handle(Request request, Response response) {
  super.handle(request, response);
  Restlet next = getNext(request, response);
  if (next != null) {
    doHandle(next, request, response);
  } else {
    response.setStatus(Status.CLIENT_ERROR_NOT_FOUND);
  }
}

代码示例来源:origin: org.restlet.jee/org.restlet.ext.apispark

TemplateRoute templateRoute = (TemplateRoute) router.getNext(request,
    response);

代码示例来源:origin: org.restlet.jee/org.restlet.ext.platform

TemplateRoute templateRoute = (TemplateRoute) router.getNext(request,
    response);

代码示例来源:origin: org.restlet.jse/org.restlet.ext.platform

TemplateRoute templateRoute = (TemplateRoute) router.getNext(request,
    response);

代码示例来源:origin: org.restlet.gae/org.restlet.ext.platform

TemplateRoute templateRoute = (TemplateRoute) router.getNext(request,
    response);

代码示例来源:origin: org.restlet.osgi/org.restlet.ext.platform

TemplateRoute templateRoute = (TemplateRoute) router.getNext(request,
    response);

相关文章