public class

BasicHttpContext

extends Object
implements HttpContext
java.lang.Object
   ↳ org.apache.http.protocol.BasicHttpContext
Known Direct Subclasses

Class Overview

Default implementation of HttpContext.

Please note methods of this class are not synchronized and therefore may be threading unsafe.

Summary

[Expand]
Inherited Constants
From interface org.apache.http.protocol.HttpContext
Public Constructors
BasicHttpContext()
BasicHttpContext(HttpContext parentContext)
Public Methods
Object getAttribute(String id)
Obtains attribute with the given name.
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.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.http.protocol.HttpContext

Public Constructors

public BasicHttpContext ()

public BasicHttpContext (HttpContext parentContext)

Public Methods

public Object getAttribute (String id)

Obtains attribute with the given name.

Parameters
id the attribute name.
Returns
  • attribute value, or null if not set.

public Object removeAttribute (String id)

Removes attribute with the given name from the context.

Parameters
id the attribute name.
Returns
  • attribute value, or null if not set.

public void setAttribute (String id, Object obj)

Sets value of the attribute with the given name.

Parameters
id the attribute name.
obj the attribute value.