org.eclipse.jetty.client
Class ContentExchange
java.lang.Object
org.eclipse.jetty.client.HttpExchange
org.eclipse.jetty.client.CachedExchange
org.eclipse.jetty.client.ContentExchange
- Direct Known Subclasses:
- HttpExchange.ContentExchange
public class ContentExchange
- extends CachedExchange
A CachedExchange that retains all content for later use.
Methods inherited from class org.eclipse.jetty.client.HttpExchange |
addRequestHeader, addRequestHeader, cancel, configureListeners, getAddress, getEventListener, getMethod, getRequestContent, getRequestContentChunk, getRequestContentSource, getRequestFields, getRetryStatus, getScheme, getStatus, getURI, getVersion, isDone, onConnectionFailed, onException, onExpire, onRequestCommitted, onRequestComplete, onResponseComplete, onResponseHeaderComplete, reset, setAddress, setConfigureListeners, setEventListener, setMethod, setRequestContent, setRequestContentSource, setRequestContentType, setRequestHeader, setRequestHeader, setRetryStatus, setScheme, setURI, setURL, setVersion, setVersion, toString, waitForDone, waitForStatus |
ContentExchange
public ContentExchange()
ContentExchange
public ContentExchange(boolean cacheFields)
getResponseContent
public String getResponseContent()
throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
onResponseHeader
protected void onResponseHeader(Buffer name,
Buffer value)
throws IOException
- Description copied from class:
HttpExchange
- Called for each response header received
- Overrides:
onResponseHeader
in class CachedExchange
- Parameters:
name
- header namevalue
- header value
- Throws:
IOException
onResponseContent
protected void onResponseContent(Buffer content)
throws IOException
- Description copied from class:
HttpExchange
- Called for each chunk of the response content received.
- Overrides:
onResponseContent
in class HttpExchange
- Throws:
IOException
onRetry
protected void onRetry()
throws IOException
- Description copied from class:
HttpExchange
- Called when the request is retried (due to failures or authentication).
Implementations may need to reset any consumable content that needs to
be sent.
- Overrides:
onRetry
in class HttpExchange
- Throws:
IOException
getFileForUpload
public File getFileForUpload()
setFileForUpload
public void setFileForUpload(File fileForUpload)
throws IOException
- Throws:
IOException
Copyright © 1995-2009 Mort Bay Consulting. All Rights Reserved.