org.jooby.Router.decode()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(235)

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

Router.decode介绍

[英]Decode a path by delegating to URLDecoder#decode(String,String).
[中]通过委托给URLDecover#Decode(String,String)来解码路径。

代码示例

代码示例来源:origin: jooby-project/jooby

public ServletServletRequest(final HttpServletRequest req, final String tmpdir,
  final boolean multipart) throws IOException {
 this.req = requireNonNull(req, "HTTP req is required.");
 this.tmpdir = requireNonNull(tmpdir, "A tmpdir is required.");
 this.multipart = multipart;
 String pathInfo = req.getPathInfo();
 if (pathInfo == null) {
  pathInfo = "/";
 }
 this.path = req.getContextPath() + Router.decode(pathInfo);
}

代码示例来源:origin: jooby-project/jooby

public UndertowRequest(final HttpServerExchange exchange, final Config conf) throws IOException {
 this.exchange = exchange;
 this.blocking = Suppliers.memoize(() -> this.exchange.startBlocking());
 this.conf = conf;
 this.path = Router.decode(exchange.getRequestPath());
}

代码示例来源:origin: jooby-project/jooby

public NettyRequest(final ChannelHandlerContext ctx, final HttpRequest req,
  final HttpHeaders responseHeaders, final String tmpdir, final int wsMaxMessageSize) {
 this.ctx = ctx;
 this.req = req;
 this.responseHeaders = responseHeaders;
 this.tmpdir = tmpdir;
 this.query = new QueryStringDecoder(req.uri());
 this.path = Router.decode(query.path());
 this.wsMaxMessageSize = wsMaxMessageSize;
 Channel channel = ctx.channel();
 channel.attr(ASYNC).set(false);
}

代码示例来源:origin: org.jooby/jooby-servlet

public ServletServletRequest(final HttpServletRequest req, final String tmpdir,
  final boolean multipart) throws IOException {
 this.req = requireNonNull(req, "HTTP req is required.");
 this.tmpdir = requireNonNull(tmpdir, "A tmpdir is required.");
 this.multipart = multipart;
 String pathInfo = req.getPathInfo();
 if (pathInfo == null) {
  pathInfo = "/";
 }
 this.path = req.getContextPath() + Router.decode(pathInfo);
}

代码示例来源:origin: org.jooby/jooby-undertow

public UndertowRequest(final HttpServerExchange exchange, final Config conf) throws IOException {
 this.exchange = exchange;
 this.blocking = Suppliers.memoize(() -> this.exchange.startBlocking());
 this.conf = conf;
 this.path = Router.decode(exchange.getRequestPath());
}

代码示例来源:origin: org.jooby/jooby-netty

public NettyRequest(final ChannelHandlerContext ctx, final HttpRequest req,
  final HttpHeaders responseHeaders, final String tmpdir, final int wsMaxMessageSize) {
 this.ctx = ctx;
 this.req = req;
 this.responseHeaders = responseHeaders;
 this.tmpdir = tmpdir;
 this.query = new QueryStringDecoder(req.uri());
 this.path = Router.decode(query.path());
 this.wsMaxMessageSize = wsMaxMessageSize;
 Channel channel = ctx.channel();
 channel.attr(ASYNC).set(false);
}

相关文章