public class

SyncBasicHttpContext

extends BasicHttpContext
java.lang.Object
   ↳ org.apache.http.protocol.BasicHttpContext
     ↳ org.apache.http.protocol.SyncBasicHttpContext

Class Overview

Thread-safe extension of the BasicHttpContext.

Summary

[Expand]
Inherited Constants
From interface org.apache.http.protocol.HttpContext
Public Constructors
SyncBasicHttpContext(HttpContext parentContext)
Public Methods
synchronized Object getAttribute(String id)
Obtains attribute with the given name.
synchronized Object removeAttribute(String id)
Removes attribute with the given name from the context.
synchronized void setAttribute(String id, Object obj)
Sets value of the attribute with the given name.
[Expand]
Inherited Methods
From class org.apache.http.protocol.BasicHttpContext
From class java.lang.Object
From interface org.apache.http.protocol.HttpContext

Public Constructors

public SyncBasicHttpContext (HttpContext parentContext)

Public Methods

public synchronized Object getAttribute (String id)

Obtains attribute with the given name.

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

public synchronized 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 synchronized void setAttribute (String id, Object obj)

Sets value of the attribute with the given name.

Parameters
id the attribute name.
obj the attribute value.