本文整理了Java中com.amazonaws.http.HttpResponseHandler.needsConnectionLeftOpen()
方法的一些代码示例,展示了HttpResponseHandler.needsConnectionLeftOpen()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpResponseHandler.needsConnectionLeftOpen()
方法的具体详情如下:
包路径:com.amazonaws.http.HttpResponseHandler
类名称:HttpResponseHandler
方法名:needsConnectionLeftOpen
[英]Indicates if this response handler requires that the underlying HTTP connection not be closed automatically after the response is handled.
For example, if the object returned by this response handler manually manages the stream of data from the HTTP connection, and doesn't read all the data from the connection in the #handle(HttpResponse) method, this method can be used to prevent the underlying connection from being prematurely closed.
Response handlers should use this option very carefully, since it means that resource cleanup is no longer handled automatically, and if neglected, can result in the client runtime running out of resources for new HTTP connections.
[中]指示此响应处理程序是否要求在处理响应后不会自动关闭基础HTTP连接。
例如,如果此响应处理程序返回的对象手动管理来自HTTP连接的数据流,并且没有在#handle(HttpResponse)方法中读取来自连接的所有数据,则可以使用此方法防止基础连接过早关闭。
响应处理程序应该非常小心地使用此选项,因为这意味着不再自动处理资源清理,如果忽略,可能会导致客户端运行时耗尽新HTTP连接的资源。
代码示例来源:origin: aws/aws-sdk-java
@Override
public boolean needsConnectionLeftOpen() {
return delegate.needsConnectionLeftOpen();
}
代码示例来源:origin: aws/aws-sdk-java
@Override
public boolean needsConnectionLeftOpen() {
return delegate.needsConnectionLeftOpen();
}
}
代码示例来源:origin: aws/aws-sdk-java
@Override
public boolean needsConnectionLeftOpen() {
return delegate.needsConnectionLeftOpen();
}
代码示例来源:origin: com.amazonaws/aws-java-sdk-core
@Override
public boolean needsConnectionLeftOpen() {
return delegate.needsConnectionLeftOpen();
}
代码示例来源:origin: com.amazonaws/aws-java-sdk-core
@Override
public boolean needsConnectionLeftOpen() {
return delegate.needsConnectionLeftOpen();
}
代码示例来源:origin: aws/aws-sdk-java
if (shouldBufferHttpEntity(responseHandler.needsConnectionLeftOpen(),
executionContext,
execOneParams,
execOneParams.leaveHttpConnectionOpen = responseHandler.needsConnectionLeftOpen();
HttpResponse httpResponse = ApacheUtils.createResponse(request, execOneParams.apacheRequest, execOneParams.apacheResponse, localRequestContext);
Output response = handleResponse(httpResponse);
return null; // => retry
execOneParams.leaveHttpConnectionOpen = errorResponseHandler.needsConnectionLeftOpen();
final SdkBaseException exception = handleErrorResponse(execOneParams.apacheRequest,
execOneParams.apacheResponse,
代码示例来源:origin: Nextdoor/bender
@Override
public boolean needsConnectionLeftOpen() {
return delegate.needsConnectionLeftOpen();
}
代码示例来源:origin: Nextdoor/bender
@Override
public boolean needsConnectionLeftOpen() {
return delegate.needsConnectionLeftOpen();
}
}
代码示例来源:origin: aws-amplify/aws-sdk-android
.expect(handler.needsConnectionLeftOpen())
.andReturn(false)
.anyTimes();
代码示例来源:origin: aws-amplify/aws-sdk-android
leaveHttpConnectionOpen = responseHandler.needsConnectionLeftOpen();
final T response = handleResponse(request, responseHandler,
httpResponse,
awsRequestMetrics.addProperty(Field.AWSRequestID, null);
} else {
leaveHttpConnectionOpen = errorResponseHandler.needsConnectionLeftOpen();
final AmazonServiceException ase = handleErrorResponse(request, errorResponseHandler,
httpResponse);
代码示例来源:origin: com.amazonaws/aws-java-sdk-core
if (shouldBufferHttpEntity(responseHandler.needsConnectionLeftOpen(),
executionContext,
execOneParams,
execOneParams.leaveHttpConnectionOpen = responseHandler.needsConnectionLeftOpen();
HttpResponse httpResponse = ApacheUtils.createResponse(request, execOneParams.apacheRequest, execOneParams.apacheResponse, localRequestContext);
Output response = handleResponse(httpResponse);
return null; // => retry
execOneParams.leaveHttpConnectionOpen = errorResponseHandler.needsConnectionLeftOpen();
final SdkBaseException exception = handleErrorResponse(execOneParams.apacheRequest,
execOneParams.apacheResponse,
代码示例来源:origin: com.gluonhq/aws-java-sdk-core
leaveHttpConnectionOpen = responseHandler.needsConnectionLeftOpen();
final T response = handleResponse(request, responseHandler,
httpResponse,
awsRequestMetrics.addProperty(Field.AWSRequestID, null);
} else {
leaveHttpConnectionOpen = errorResponseHandler.needsConnectionLeftOpen();
final AmazonServiceException ase = handleErrorResponse(request, errorResponseHandler,
httpResponse);
代码示例来源:origin: com.amazonaws/aws-android-sdk-core
leaveHttpConnectionOpen = responseHandler.needsConnectionLeftOpen();
final T response = handleResponse(request, responseHandler,
httpResponse,
awsRequestMetrics.addProperty(Field.AWSRequestID, null);
} else {
leaveHttpConnectionOpen = errorResponseHandler.needsConnectionLeftOpen();
final AmazonServiceException ase = handleErrorResponse(request, errorResponseHandler,
httpResponse);
代码示例来源:origin: Nextdoor/bender
if (shouldBufferHttpEntity(responseHandler.needsConnectionLeftOpen(),
executionContext,
execOneParams,
execOneParams.leaveHttpConnectionOpen = responseHandler.needsConnectionLeftOpen();
HttpResponse httpResponse = createResponse(execOneParams.apacheRequest,
execOneParams.apacheResponse,
return null; // => retry
execOneParams.leaveHttpConnectionOpen = errorResponseHandler.needsConnectionLeftOpen();
final SdkBaseException exception = handleErrorResponse(execOneParams.apacheRequest,
execOneParams.apacheResponse,
内容来源于网络,如有侵权,请联系作者删除!