org.eclipse.jetty.client
类 ContentExchange

java.lang.Object
  继承者 org.eclipse.jetty.client.HttpExchange
      继承者 org.eclipse.jetty.client.CachedExchange
          继承者 org.eclipse.jetty.client.ContentExchange
直接已知子类:
HttpExchange.ContentExchange

public class ContentExchange
extends CachedExchange

A exchange that retains response content for later use.


嵌套类摘要
 
从类 org.eclipse.jetty.client.HttpExchange 继承的嵌套类/接口
HttpExchange.CachedExchange, HttpExchange.ContentExchange
 
字段摘要
 
从类 org.eclipse.jetty.client.HttpExchange 继承的字段
STATUS_CANCELLED, STATUS_CANCELLING, STATUS_COMPLETED, STATUS_EXCEPTED, STATUS_EXPIRED, STATUS_PARSING_CONTENT, STATUS_PARSING_HEADERS, STATUS_SENDING_REQUEST, STATUS_START, STATUS_WAITING_FOR_COMMIT, STATUS_WAITING_FOR_CONNECTION, STATUS_WAITING_FOR_RESPONSE
 
构造方法摘要
ContentExchange()
           
ContentExchange(boolean cacheFields)
           
 
方法摘要
 File getFileForUpload()
           
 String getResponseContent()
           
 byte[] getResponseContentBytes()
           
protected  void onResponseContent(Buffer content)
          Callback called for each chunk of the response content received from the server.
protected  void onResponseHeader(Buffer name, Buffer value)
          Callback called for each response header received from the server.
protected  void onResponseStatus(Buffer version, int status, Buffer reason)
          Callback called when a response status line has been received from the server.
protected  void onRetry()
          Callback called when the request is retried (due to failures or authentication).
 void setFileForUpload(File fileForUpload)
           
 
从类 org.eclipse.jetty.client.CachedExchange 继承的方法
getResponseFields, getResponseStatus
 
从类 org.eclipse.jetty.client.HttpExchange 继承的方法
addRequestHeader, addRequestHeader, cancel, cancelTimeout, configureListeners, expire, getAddress, getEventListener, getLocalAddress, getMethod, getRequestContent, getRequestContentChunk, getRequestContentSource, getRequestFields, getRequestURI, getRetryStatus, getScheme, getStatus, getTimeout, getURI, getVersion, isDone, isDone, onConnectionFailed, onException, onExpire, onRequestCommitted, onRequestComplete, onResponseComplete, onResponseHeaderComplete, onSwitchProtocol, reset, scheduleTimeout, setAddress, setConfigureListeners, setEventListener, setMethod, setRequestContent, setRequestContentSource, setRequestContentType, setRequestHeader, setRequestHeader, setRequestURI, setRetryStatus, setScheme, setScheme, setTimeout, setURI, setURI, setURL, setVersion, setVersion, toState, toString, waitForDone, waitForStatus
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

ContentExchange

public ContentExchange()

ContentExchange

public ContentExchange(boolean cacheFields)
方法详细信息

getResponseContent

public String getResponseContent()
                          throws UnsupportedEncodingException
抛出:
UnsupportedEncodingException

getResponseContentBytes

public byte[] getResponseContentBytes()

onResponseStatus

protected void onResponseStatus(Buffer version,
                                int status,
                                Buffer reason)
                         throws IOException
从类 HttpExchange 复制的描述
Callback called when a response status line has been received from the server. This implementation does nothing.

覆盖:
CachedExchange 中的 onResponseStatus
参数:
version - the HTTP version
status - the HTTP status code
reason - the HTTP status reason string
抛出:
IOException - allowed to be thrown by overriding code

onResponseHeader

protected void onResponseHeader(Buffer name,
                                Buffer value)
                         throws IOException
从类 HttpExchange 复制的描述
Callback called for each response header received from the server. This implementation does nothing.

覆盖:
CachedExchange 中的 onResponseHeader
参数:
name - the header name
value - the header value
抛出:
IOException - allowed to be thrown by overriding code

onResponseContent

protected void onResponseContent(Buffer content)
                          throws IOException
从类 HttpExchange 复制的描述
Callback called for each chunk of the response content received from the server. This implementation does nothing.

覆盖:
HttpExchange 中的 onResponseContent
参数:
content - the buffer holding the content chunk
抛出:
IOException - allowed to be thrown by overriding code

onRetry

protected void onRetry()
                throws IOException
从类 HttpExchange 复制的描述
Callback called when the request is retried (due to failures or authentication). Implementations must reset any consumable content that needs to be sent.

覆盖:
HttpExchange 中的 onRetry
抛出:
IOException - allowed to be thrown by overriding code

getFileForUpload

public File getFileForUpload()

setFileForUpload

public void setFileForUpload(File fileForUpload)
                      throws IOException
抛出:
IOException


Copyright © 2013. All Rights Reserved.