Top Description Fields Constructors Methods
org.apache.http.protocol

public final Class DefaultedHttpContext

extends Object
implements HttpContext
Class Inheritance
All Implemented Interfaces
org.apache.http.protocol.HttpContext
Annotations
@Deprecated
Imports
org.apache.http.util.Args

Deprecated

(4.3) no longer used.

HttpContext implementation that delegates resolution of an attribute to the given default HttpContext instance if the attribute is not present in the local one. The state of the local context can be mutated, whereas the default context is treated as read-only.
Since
4.0

Field Summary

Modifier and TypeField and Description
private final HttpContext
private final HttpContext

Constructor Summary

AccessConstructor and Description
public
DefaultedHttpContext(final HttpContext local, final HttpContext defaults)

Method Summary

Modifier and TypeMethod and Description
public Object
getAttribute(final String
the attribute name.
id
)

Implements org.apache.http.protocol.HttpContext.getAttribute.

Obtains attribute with the given name.
public HttpContext
public Object
removeAttribute(final String
the attribute name.
id
)

Implements org.apache.http.protocol.HttpContext.removeAttribute.

Removes attribute with the given name from the context.
public void
setAttribute(final String
the attribute name.
id
,
final Object
the attribute value.
obj
)

Implements org.apache.http.protocol.HttpContext.setAttribute.

Sets value of the attribute with the given name.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

defaultsback to summary
private final HttpContext defaults
localback to summary
private final HttpContext local

Constructor Detail

DefaultedHttpContextback to summary
public DefaultedHttpContext(final HttpContext local, final HttpContext defaults)

Method Detail

getAttributeback to summary
public Object getAttribute(final String id)

Implements org.apache.http.protocol.HttpContext.getAttribute.

Doc from org.apache.http.protocol.HttpContext.getAttribute.

Obtains attribute with the given name.

Parameters
id:String

the attribute name.

Returns:Object

attribute value, or null if not set.

Annotations
@Override
getDefaultsback to summary
public HttpContext getDefaults()
removeAttributeback to summary
public Object removeAttribute(final String id)

Implements org.apache.http.protocol.HttpContext.removeAttribute.

Doc from org.apache.http.protocol.HttpContext.removeAttribute.

Removes attribute with the given name from the context.

Parameters
id:String

the attribute name.

Returns:Object

attribute value, or null if not set.

Annotations
@Override
setAttributeback to summary
public void setAttribute(final String id, final Object obj)

Implements org.apache.http.protocol.HttpContext.setAttribute.

Doc from org.apache.http.protocol.HttpContext.setAttribute.

Sets value of the attribute with the given name.

Parameters
id:String

the attribute name.

obj:Object

the attribute value.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override