org.glassfish.grizzly.http.server.Request.appendRequestURL()方法的使用及代码示例

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

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

Request.appendRequestURL介绍

[英]Appends the reconstructed URL the client used to make the request. The appended URL contains a protocol, server name, port number, and server path, but it does not include query string parameters.

Because this method returns a StringBuffer, not a String, you can modify the URL easily, for example, to append query parameters.

This method is useful for creating redirect messages and for reporting errors.
[中]追加客户端用于发出请求的重建URL。附加的URL包含协议、服务器名称、端口号和服务器路径,但不包括查询字符串参数。
由于此方法返回的是StringBuffer,而不是String,因此您可以轻松地修改URL,例如,添加查询参数。
此方法对于创建重定向消息和报告错误非常有用。

代码示例

代码示例来源:origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public StringBuffer getRequestURL() {
  if (request == null) {
    throw new IllegalStateException("Null request object");
  }
  return Request.appendRequestURL(request, new StringBuffer());
}

代码示例来源:origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public StringBuffer getRequestURL() {
  if (request == null) {
    throw new IllegalStateException("Null request object");
  }
  return Request.appendRequestURL(request, new StringBuffer());
}

代码示例来源:origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public StringBuffer getRequestURL() {
  if (request == null) {
    throw new IllegalStateException("Null request object");
  }
  return Request.appendRequestURL(request, new StringBuffer());
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server

/**
 * {@inheritDoc}
 */
@Override
public StringBuffer getRequestURL() {
  if (request == null) {
    throw new IllegalStateException("Null request object");
  }
  return Request.appendRequestURL(request, new StringBuffer());
}

代码示例来源:origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public StringBuffer getRequestURL() {
  if (request == null) {
    throw new IllegalStateException("Null request object");
  }
  return Request.appendRequestURL(request, new StringBuffer());
}

代码示例来源:origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public StringBuffer getRequestURL() {
  if (request == null) {
    throw new IllegalStateException("Null request object");
  }
  return Request.appendRequestURL(request, new StringBuffer());
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server

/**
 * Reconstructs the URL the client used to make the request.
 * The returned URL contains a protocol, server name, port
 * number, and server path, but it does not include query
 * string parameters.
 * <p>
 * Because this method returns a <code>StringBuilder</code>,
 * not a <code>String</code>, you can modify the URL easily,
 * for example, to append query parameters.
 * <p>
 * This method is useful for creating redirect messages and
 * for reporting errors.
 *
 * @return A <code>StringBuffer</code> object containing the
 *  reconstructed URL
 */
public StringBuilder getRequestURL() {
  final StringBuilder url = new StringBuilder();
  return appendRequestURL(this, url);
}

代码示例来源:origin: javaee/grizzly

/**
 * Reconstructs the URL the client used to make the request.
 * The returned URL contains a protocol, server name, port
 * number, and server path, but it does not include query
 * string parameters.
 * <p>
 * Because this method returns a <code>StringBuilder</code>,
 * not a <code>String</code>, you can modify the URL easily,
 * for example, to append query parameters.
 * <p>
 * This method is useful for creating redirect messages and
 * for reporting errors.
 *
 * @return A <code>StringBuffer</code> object containing the
 *  reconstructed URL
 */
public StringBuilder getRequestURL() {
  final StringBuilder url = new StringBuilder();
  return appendRequestURL(this, url);
}

代码示例来源:origin: javaee/grizzly

/**
 * Reconstructs the URL the client used to make the request.
 * The returned URL contains a protocol, server name, port
 * number, and server path, but it does not include query
 * string parameters.
 * <p>
 * Because this method returns a <code>StringBuilder</code>,
 * not a <code>String</code>, you can modify the URL easily,
 * for example, to append query parameters.
 * <p>
 * This method is useful for creating redirect messages and
 * for reporting errors.
 *
 * @return A <code>StringBuffer</code> object containing the
 *  reconstructed URL
 */
public StringBuilder getRequestURL() {
  final StringBuilder url = new StringBuilder();
  return appendRequestURL(this, url);
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server

/**
 * Reconstructs the URL the client used to make the request.
 * The returned URL contains a protocol, server name, port
 * number, and server path, but it does not include query
 * string parameters.
 * <p>
 * Because this method returns a <code>StringBuilder</code>,
 * not a <code>String</code>, you can modify the URL easily,
 * for example, to append query parameters.
 * <p>
 * This method is useful for creating redirect messages and
 * for reporting errors.
 *
 * @return A <code>StringBuffer</code> object containing the
 *  reconstructed URL
 */
public StringBuilder getRequestURL() {
  final StringBuilder url = new StringBuilder();
  return appendRequestURL(this, url);
}

代码示例来源:origin: javaee/grizzly

/**
 * Reconstructs the URL the client used to make the request.
 * The returned URL contains a protocol, server name, port
 * number, and server path, but it does not include query
 * string parameters.
 * <p>
 * Because this method returns a <code>StringBuilder</code>,
 * not a <code>String</code>, you can modify the URL easily,
 * for example, to append query parameters.
 * <p>
 * This method is useful for creating redirect messages and
 * for reporting errors.
 *
 * @return A <code>StringBuffer</code> object containing the
 *  reconstructed URL
 */
public StringBuilder getRequestURL() {
  final StringBuilder url = new StringBuilder();
  return appendRequestURL(this, url);
}

代码示例来源:origin: javaee/grizzly

/**
 * Reconstructs the URL the client used to make the request.
 * The returned URL contains a protocol, server name, port
 * number, and server path, but it does not include query
 * string parameters.
 * <p>
 * Because this method returns a <code>StringBuilder</code>,
 * not a <code>String</code>, you can modify the URL easily,
 * for example, to append query parameters.
 * <p>
 * This method is useful for creating redirect messages and
 * for reporting errors.
 *
 * @return A <code>StringBuffer</code> object containing the
 *  reconstructed URL
 */
public StringBuilder getRequestURL() {
  final StringBuilder url = new StringBuilder();
  return appendRequestURL(this, url);
}

代码示例来源:origin: javaee/grizzly

/**
 * Reconstructs the URL the client used to make the request.
 * The returned URL contains a protocol, server name, port
 * number, and server path, but it does not include query
 * string parameters.
 * <p>
 * Because this method returns a <code>StringBuilder</code>,
 * not a <code>String</code>, you can modify the URL easily,
 * for example, to append query parameters.
 * <p>
 * This method is useful for creating redirect messages and
 * for reporting errors.
 *
 * @return A <code>StringBuffer</code> object containing the
 *  reconstructed URL
 */
public StringBuilder getRequestURL() {
  final StringBuilder url = new StringBuilder();
  return appendRequestURL(this, url);
}

代码示例来源:origin: javaee/grizzly

/**
 * Reconstructs the URL the client used to make the request.
 * The returned URL contains a protocol, server name, port
 * number, and server path, but it does not include query
 * string parameters.
 * <p>
 * Because this method returns a <code>StringBuilder</code>,
 * not a <code>String</code>, you can modify the URL easily,
 * for example, to append query parameters.
 * <p>
 * This method is useful for creating redirect messages and
 * for reporting errors.
 *
 * @return A <code>StringBuffer</code> object containing the
 *  reconstructed URL
 */
public StringBuilder getRequestURL() {
  final StringBuilder url = new StringBuilder();
  return appendRequestURL(this, url);
}

代码示例来源:origin: javaee/grizzly

/**
 * Reconstructs the URL the client used to make the request.
 * The returned URL contains a protocol, server name, port
 * number, and server path, but it does not include query
 * string parameters.
 * <p>
 * Because this method returns a <code>StringBuilder</code>,
 * not a <code>String</code>, you can modify the URL easily,
 * for example, to append query parameters.
 * <p>
 * This method is useful for creating redirect messages and
 * for reporting errors.
 *
 * @return A <code>StringBuffer</code> object containing the
 *  reconstructed URL
 */
public StringBuilder getRequestURL() {
  final StringBuilder url = new StringBuilder();
  return appendRequestURL(this, url);
}

代码示例来源:origin: org.mule.glassfish.grizzly/grizzly-http-server

/**
 * Reconstructs the URL the client used to make the request.
 * The returned URL contains a protocol, server name, port
 * number, and server path, but it does not include query
 * string parameters.
 * <p>
 * Because this method returns a <code>StringBuilder</code>,
 * not a <code>String</code>, you can modify the URL easily,
 * for example, to append query parameters.
 * <p>
 * This method is useful for creating redirect messages and
 * for reporting errors.
 *
 * @return A <code>StringBuffer</code> object containing the
 *  reconstructed URL
 */
public StringBuilder getRequestURL() {
  final StringBuilder url = new StringBuilder();
  return appendRequestURL(this, url);
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server-core

/**
 * Reconstructs the URL the client used to make the request.
 * The returned URL contains a protocol, server name, port
 * number, and server path, but it does not include query
 * string parameters.
 * <p>
 * Because this method returns a <code>StringBuilder</code>,
 * not a <code>String</code>, you can modify the URL easily,
 * for example, to append query parameters.
 * <p>
 * This method is useful for creating redirect messages and
 * for reporting errors.
 *
 * @return A <code>StringBuffer</code> object containing the
 *  reconstructed URL
 */
public StringBuilder getRequestURL() {
  final StringBuilder url = new StringBuilder();
  return appendRequestURL(this, url);
}

相关文章

微信公众号

最新文章

更多

Request类方法