本文整理了Java中jodd.http.HttpResponse.isConnectionPersistent()
方法的一些代码示例,展示了HttpResponse.isConnectionPersistent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpResponse.isConnectionPersistent()
方法的具体详情如下:
包路径:jodd.http.HttpResponse
类名称:HttpResponse
方法名:isConnectionPersistent
暂无
代码示例来源:origin: oblac/jodd
private HttpResponse _send() {
if (httpConnection == null) {
open();
}
// sends data
final HttpResponse httpResponse;
try {
OutputStream outputStream = httpConnection.getOutputStream();
sendTo(outputStream);
InputStream inputStream = httpConnection.getInputStream();
httpResponse = HttpResponse.readFrom(inputStream);
httpResponse.assignHttpRequest(this);
} catch (IOException ioex) {
throw new HttpException(ioex);
}
boolean keepAlive = httpResponse.isConnectionPersistent();
if (!keepAlive) {
// closes connection if keep alive is false, or if counter reached 0
httpConnection.close();
httpConnection = null;
}
return httpResponse;
}
代码示例来源:origin: oblac/jodd
boolean keepAlive = httpResponse.isConnectionPersistent();
if (keepAlive) {
HttpConnection previousConnection = httpResponse.getHttpRequest().httpConnection;
代码示例来源:origin: oblac/jodd
assertTrue(response.isConnectionPersistent());
assertNotNull(request.connection());
assertTrue(response.isConnectionPersistent());
assertNotNull(request.connection());
assertFalse(response.isConnectionPersistent());
assertTrue(response.isConnectionPersistent());
assertNotNull(request.connection());
代码示例来源:origin: oblac/jodd
assertTrue(response.isConnectionPersistent());
assertNotNull(request.connection());
assertTrue(response.isConnectionPersistent());
assertNotNull(request.connection());
assertFalse(response.isConnectionPersistent());
assertTrue(response.isConnectionPersistent());
assertNotNull(request.connection());
代码示例来源:origin: org.jodd/jodd-http
private HttpResponse _send() {
if (httpConnection == null) {
open();
}
// sends data
final HttpResponse httpResponse;
try {
OutputStream outputStream = httpConnection.getOutputStream();
sendTo(outputStream);
InputStream inputStream = httpConnection.getInputStream();
httpResponse = HttpResponse.readFrom(inputStream);
httpResponse.assignHttpRequest(this);
} catch (IOException ioex) {
throw new HttpException(ioex);
}
boolean keepAlive = httpResponse.isConnectionPersistent();
if (!keepAlive) {
// closes connection if keep alive is false, or if counter reached 0
httpConnection.close();
httpConnection = null;
}
return httpResponse;
}
代码示例来源:origin: org.jodd/jodd-http
boolean keepAlive = httpResponse.isConnectionPersistent();
if (keepAlive) {
HttpConnection previousConnection = httpResponse.getHttpRequest().httpConnection;
内容来源于网络,如有侵权,请联系作者删除!