@Deprecated public class BasicManagedEntity extends HttpEntityWrapper implements ConnectionReleaseTrigger, EofSensorWatcher
connection的实体。
A ManagedClientConnection通常不会返回被管实体,但您可以使用受管实体替换响应中的非托管实体。
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
attemptReuse
已过时。
是否保持连接活着。
|
protected ManagedClientConnection |
managedConn
已过时。
要释放的连接。
|
wrappedEntity| Constructor and Description |
|---|
BasicManagedEntity(HttpEntity entity, ManagedClientConnection conn, boolean reuse)
已过时。
创建一个可以释放连接的新管理实体。
|
| Modifier and Type | Method and Description |
|---|---|
void |
abortConnection()
已过时。
释放连接而不选择保持活动。
|
void |
consumeContent()
已过时。
|
boolean |
eofDetected(InputStream wrapped)
已过时。
表示检测到EOF。
|
InputStream |
getContent()
已过时。
|
boolean |
isRepeatable()
已过时。
|
void |
releaseConnection()
已过时。
释放与keep-alive选项的连接。
|
protected void |
releaseManagedConnection()
已过时。
正确释放连接。
|
boolean |
streamAbort(InputStream wrapped)
已过时。
表示 stream中止了。
|
boolean |
streamClosed(InputStream wrapped)
已过时。
表示 stream已关闭。
|
void |
writeTo(OutputStream outstream)
已过时。
|
getContentEncoding, getContentLength, getContentType, isChunked, isStreamingprotected ManagedClientConnection managedConn
protected final boolean attemptReuse
public BasicManagedEntity(HttpEntity entity, ManagedClientConnection conn, boolean reuse)
entity - 包装内容的实体。
请注意,以后不能再使用参数实体,因为内容将被该被管实体采用。
conn - 要发布的连接
reuse - 连接是否应重新使用
public boolean isRepeatable()
isRepeatable在接口
HttpEntity
isRepeatable在
HttpEntityWrapper
public InputStream getContent() throws IOException
getContent在接口
HttpEntity
getContent在
HttpEntityWrapper
IOException
@Deprecated public void consumeContent() throws IOException
EntityUtils.consume(HttpEntity)
consumeContent在接口
HttpEntity
consumeContent在
HttpEntityWrapper
IOException
public void writeTo(OutputStream outstream) throws IOException
writeTo在接口
HttpEntity
writeTo在
HttpEntityWrapper
IOException
public void releaseConnection()
throws IOException
ConnectionReleaseTrigger复制
releaseConnection在接口
ConnectionReleaseTrigger
IOException - 在IO问题的情况下。
连接将会被释放。
public void abortConnection()
throws IOException
ConnectionReleaseTrigger复制
abortConnection在接口
ConnectionReleaseTrigger
IOException - 在IO问题的情况下。
连接将会被释放。
public boolean eofDetected(InputStream wrapped) throws IOException
EofSensorWatcher复制
eofDetected在接口
EofSensorWatcher
wrapped - 达到EOF的底层流
true如果
wrapped应该关闭,
false如果应该单独
IOException - 在IO问题的情况下,例如,如果观察者本身关闭底层流。
呼叫者将离开包裹的流,就像false被返回。
public boolean streamClosed(InputStream wrapped) throws IOException
EofSensorWatcher复制
streamClosed在接口
EofSensorWatcher
wrapped - 尚未达到EOF的基础流
true如果
wrapped应该关闭,
false如果应该单独
IOException - 在IO问题的情况下,例如,如果观察者本身关闭底层流。
呼叫者将离开包裹的流,就像false回false 。
public boolean streamAbort(InputStream wrapped) throws IOException
EofSensorWatcher复制
streamAbort在接口
EofSensorWatcher
wrapped - 尚未达到EOF的基础流
true如果
wrapped应该关闭,
false如果应该单独
IOException - 在IO问题的情况下,例如,如果观察者本身关闭底层流。
呼叫者将独自离开包裹的流,就好像false被返回。
protected void releaseManagedConnection()
throws IOException
IOException - 在IO问题的情况下。
连接属性将无效。
Copyright © 1999–2017 The Apache Software Foundation. All rights reserved.