|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.http.protocol.HttpCoreContext
public class HttpCoreContext
Implementation of HttpContext
that provides convenience
setters for user assignable attributes and getter for readable attributes.
Field Summary | |
---|---|
static String |
HTTP_CONNECTION
Attribute name of a HttpConnection object that
represents the actual HTTP connection. |
static 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 String |
HTTP_REQUEST
Attribute name of a HttpRequest object that
represents the actual HTTP request. |
static String |
HTTP_RESPONSE
Attribute name of a HttpResponse object that
represents the actual HTTP response. |
static String |
HTTP_TARGET_HOST
Attribute name of a HttpHost object that
represents the connection target. |
Fields inherited from interface org.apache.http.protocol.HttpContext |
---|
RESERVED_PREFIX |
Constructor Summary | |
---|---|
HttpCoreContext()
|
|
HttpCoreContext(HttpContext context)
|
Method Summary | ||
---|---|---|
static HttpCoreContext |
adapt(HttpContext context)
|
|
static HttpCoreContext |
create()
|
|
Object |
getAttribute(String id)
Obtains attribute with the given name. |
|
|
getAttribute(String attribname,
Class<T> clazz)
|
|
HttpConnection |
getConnection()
|
|
|
getConnection(Class<T> clazz)
|
|
HttpRequest |
getRequest()
|
|
HttpResponse |
getResponse()
|
|
HttpHost |
getTargetHost()
|
|
boolean |
isRequestSent()
|
|
Object |
removeAttribute(String id)
Removes attribute with the given name from the context. |
|
void |
setAttribute(String id,
Object obj)
Sets value of the attribute with the given name. |
|
void |
setTargetHost(HttpHost host)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String HTTP_CONNECTION
HttpConnection
object that
represents the actual HTTP connection.
public static final String HTTP_REQUEST
HttpRequest
object that
represents the actual HTTP request.
public static final String HTTP_RESPONSE
HttpResponse
object that
represents the actual HTTP response.
public static final String HTTP_TARGET_HOST
HttpHost
object that
represents the connection target.
public static final String HTTP_REQ_SENT
Boolean
object that represents the
the flag indicating whether the actual request has been fully transmitted
to the target host.
Constructor Detail |
---|
public HttpCoreContext(HttpContext context)
public HttpCoreContext()
Method Detail |
---|
public static HttpCoreContext create()
public static HttpCoreContext adapt(HttpContext context)
public Object getAttribute(String id)
HttpContext
getAttribute
in interface HttpContext
id
- the attribute name.
null
if not set.public void setAttribute(String id, Object obj)
HttpContext
setAttribute
in interface HttpContext
id
- the attribute name.obj
- the attribute value.public Object removeAttribute(String id)
HttpContext
removeAttribute
in interface HttpContext
id
- the attribute name.
null
if not set.public <T> T getAttribute(String attribname, Class<T> clazz)
public <T extends HttpConnection> T getConnection(Class<T> clazz)
public HttpConnection getConnection()
public HttpRequest getRequest()
public boolean isRequestSent()
public HttpResponse getResponse()
public void setTargetHost(HttpHost host)
public HttpHost getTargetHost()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |