org.eclipse.jetty.client
Class CachedExchange
java.lang.Object
org.eclipse.jetty.client.HttpExchange
org.eclipse.jetty.client.CachedExchange
- Direct Known Subclasses:
- ContentExchange, HttpExchange.CachedExchange, MkcolExchange
public class CachedExchange
- extends HttpExchange
An exchange that retains response status and response headers for later use.
Fields inherited from class 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 |
Constructor Summary |
CachedExchange(boolean cacheHeaders)
Creates a new CachedExchange. |
Methods inherited from class org.eclipse.jetty.client.HttpExchange |
addRequestHeader, addRequestHeader, cancel, configureListeners, getAddress, getEventListener, getLocalAddress, getMethod, getRequestContent, getRequestContentChunk, getRequestContentSource, getRequestFields, getRetryStatus, getScheme, getStatus, getTimeout, getURI, getVersion, isDone, isDone, onConnectionFailed, onException, onExpire, onRequestCommitted, onRequestComplete, onResponseComplete, onResponseContent, onResponseHeaderComplete, onRetry, onSwitchProtocol, reset, setAddress, setConfigureListeners, setEventListener, setMethod, setRequestContent, setRequestContentSource, setRequestContentType, setRequestHeader, setRequestHeader, setRetryStatus, setScheme, setTimeout, setURI, setURL, setVersion, setVersion, toString, waitForDone, waitForStatus |
CachedExchange
public CachedExchange(boolean cacheHeaders)
- Creates a new CachedExchange.
- Parameters:
cacheHeaders
- true to cache response headers, false to not cache them
getResponseStatus
public int getResponseStatus()
getResponseFields
public HttpFields getResponseFields()
onResponseStatus
protected void onResponseStatus(Buffer version,
int status,
Buffer reason)
throws IOException
- Description copied from class:
HttpExchange
- Callback called when a response status line has been received from the server.
This implementation does nothing.
- Overrides:
onResponseStatus
in class HttpExchange
- Parameters:
version
- the HTTP versionstatus
- the HTTP status codereason
- the HTTP status reason string
- Throws:
IOException
- allowed to be thrown by overriding code
onResponseHeader
protected void onResponseHeader(Buffer name,
Buffer value)
throws IOException
- Description copied from class:
HttpExchange
- Callback called for each response header received from the server.
This implementation does nothing.
- Overrides:
onResponseHeader
in class HttpExchange
- Parameters:
name
- the header namevalue
- the header value
- Throws:
IOException
- allowed to be thrown by overriding code
Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.