本文整理了Java中org.simpleframework.http.Response.isKeepAlive
方法的一些代码示例,展示了Response.isKeepAlive
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.isKeepAlive
方法的具体详情如下:
包路径:org.simpleframework.http.Response
类名称:Response
方法名:isKeepAlive
[英]This is used to determine if the HTTP response message is a keep alive message or if the underlying socket was closed. Even if the client requests a connection keep alive and supports persistent connections, the response can still be closed by the server. This can be explicitly indicated by the presence of the Connection
HTTP header, it can also be implicitly indicated by using version HTTP/1.0.
[中]这用于确定HTTP响应消息是保持活动的消息,还是底层套接字已关闭。即使客户端请求连接保持活动状态并支持持久连接,服务器仍可以关闭响应。这可以通过Connection
HTTP头的存在来明确表示,也可以通过使用HTTP/1.0版本来隐式表示。
代码示例来源:origin: org.simpleframework/simple
/**
* This is used to determine if the HTTP response message is a
* keep alive message or if the underlying socket was closed. Even
* if the client requests a connection keep alive and supports
* persistent connections, the response can still be closed by
* the server. This can be explicitly indicated by the presence
* of the <code>Connection</code> HTTP header, it can also be
* implicitly indicated by using version HTTP/1.0.
*
* @return this returns true if the connection was closed
*/
public boolean isKeepAlive() {
return response.isKeepAlive();
}
代码示例来源:origin: org.simpleframework/simple-http
/**
* This is used to determine if the HTTP response message is a
* keep alive message or if the underlying socket was closed. Even
* if the client requests a connection keep alive and supports
* persistent connections, the response can still be closed by
* the server. This can be explicitly indicated by the presence
* of the <code>Connection</code> HTTP header, it can also be
* implicitly indicated by using version HTTP/1.0.
*
* @return this returns true if the connection was closed
*/
public boolean isKeepAlive() {
return response.isKeepAlive();
}
代码示例来源:origin: ngallagher/simpleframework
/**
* This is used to determine if the HTTP response message is a
* keep alive message or if the underlying socket was closed. Even
* if the client requests a connection keep alive and supports
* persistent connections, the response can still be closed by
* the server. This can be explicitly indicated by the presence
* of the <code>Connection</code> HTTP header, it can also be
* implicitly indicated by using version HTTP/1.0.
*
* @return this returns true if the connection was closed
*/
public boolean isKeepAlive() {
return response.isKeepAlive();
}
内容来源于网络,如有侵权,请联系作者删除!