@NotThreadSafe public class HttpCoreContext extends java.lang.Object implements org.apache.http.protocol.HttpContext
HttpContext that provides convenience
setters for user assignable attributes and getter for readable attributes.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
HTTP_CONNECTION
Attribute name of a
HttpConnection object that
represents the actual HTTP connection. |
static java.lang.String |
HTTP_REQ_SENT
Attribute name of a
Boolean object that represents the
the flag indicating whether the actual request has been fully transmitted
to the target host. |
static java.lang.String |
HTTP_REQUEST
Attribute name of a
HttpRequest object that
represents the actual HTTP request. |
static java.lang.String |
HTTP_RESPONSE
Attribute name of a
HttpResponse object that
represents the actual HTTP response. |
static java.lang.String |
HTTP_TARGET_HOST
Attribute name of a
HttpHost object that
represents the connection target. |
| Constructor and Description |
|---|
HttpCoreContext() |
HttpCoreContext(org.apache.http.protocol.HttpContext context) |
| Modifier and Type | Method and Description |
|---|---|
static HttpCoreContext |
adapt(org.apache.http.protocol.HttpContext context) |
static HttpCoreContext |
create() |
java.lang.Object |
getAttribute(java.lang.String id) |
<T> T |
getAttribute(java.lang.String attribname,
java.lang.Class<T> clazz) |
org.apache.http.HttpConnection |
getConnection() |
<T extends org.apache.http.HttpConnection> |
getConnection(java.lang.Class<T> clazz) |
org.apache.http.HttpRequest |
getRequest() |
org.apache.http.HttpResponse |
getResponse() |
org.apache.http.HttpHost |
getTargetHost() |
boolean |
isRequestSent() |
java.lang.Object |
removeAttribute(java.lang.String id) |
void |
setAttribute(java.lang.String id,
java.lang.Object obj) |
void |
setTargetHost(org.apache.http.HttpHost host) |
public static final java.lang.String HTTP_CONNECTION
HttpConnection object that
represents the actual HTTP connection.public static final java.lang.String HTTP_REQUEST
HttpRequest object that
represents the actual HTTP request.public static final java.lang.String HTTP_RESPONSE
HttpResponse object that
represents the actual HTTP response.public static final java.lang.String HTTP_TARGET_HOST
HttpHost object that
represents the connection target.public static final java.lang.String HTTP_REQ_SENT
Boolean object that represents the
the flag indicating whether the actual request has been fully transmitted
to the target host.public HttpCoreContext(org.apache.http.protocol.HttpContext context)
public HttpCoreContext()
public static HttpCoreContext create()
public static HttpCoreContext adapt(org.apache.http.protocol.HttpContext context)
public java.lang.Object getAttribute(java.lang.String id)
getAttribute in interface org.apache.http.protocol.HttpContextpublic void setAttribute(java.lang.String id,
java.lang.Object obj)
setAttribute in interface org.apache.http.protocol.HttpContextpublic java.lang.Object removeAttribute(java.lang.String id)
removeAttribute in interface org.apache.http.protocol.HttpContextpublic <T> T getAttribute(java.lang.String attribname,
java.lang.Class<T> clazz)
public <T extends org.apache.http.HttpConnection> T getConnection(java.lang.Class<T> clazz)
public org.apache.http.HttpConnection getConnection()
public org.apache.http.HttpRequest getRequest()
public boolean isRequestSent()
public org.apache.http.HttpResponse getResponse()
public void setTargetHost(org.apache.http.HttpHost host)
public org.apache.http.HttpHost getTargetHost()
Copyright © 1999-2015 The Apache Software Foundation. All rights reserved.