本文整理了Java中org.glassfish.grizzly.http.server.Request.appendRequestURL
方法的一些代码示例,展示了Request.appendRequestURL
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.appendRequestURL
方法的具体详情如下:
包路径:org.glassfish.grizzly.http.server.Request
类名称: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);
}
内容来源于网络,如有侵权,请联系作者删除!