The primary purpose of the HTTP context is to facilitate information sharing among various logically related components. HTTP context can be used to store a processing state for one message or several consecutive messages. Multiple logically related messages can participate in a logical session if the same context is reused between consecutive messages.
Important Note
Please note HTTP context implementation, even when thread safe, may not be used concurrently by multiple threads, as the context may contain thread unsafe attributes.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | RESERVED_PREFIX
The prefix reserved for use by HTTP components. |
| Modifier and Type | Method and Description |
|---|---|
| public Object | Returns: attribute value, ornull if not set.the attribute name. id)Obtains attribute with the given name. |
| public ProtocolVersion | |
| public Object | Returns: attribute value, ornull if not set.the attribute name. id)Removes attribute with the given name from the context. |
| public Object | Returns: the previous value associated withid, or
null if there was no mapping for id.the attribute name. id, Object the attribute value. obj)Sets value of the attribute with the given name. |
| public void |
| RESERVED_PREFIX | back to summary |
|---|---|
| public static final String RESERVED_PREFIX The prefix reserved for use by HTTP components. "http." | |
| getAttribute | back to summary |
|---|---|
| public Object getAttribute(String id) Obtains attribute with the given name. | |
| getProtocolVersion | back to summary |
|---|---|
| public ProtocolVersion getProtocolVersion() Returns protocol version used in this context.
| |
| removeAttribute | back to summary |
|---|---|
| public Object removeAttribute(String id) Removes attribute with the given name from the context. | |
| setAttribute | back to summary |
|---|---|
| public Object setAttribute(String id, Object obj) Sets value of the attribute with the given name. | |
| setProtocolVersion | back to summary |
|---|---|
| public void setProtocolVersion(ProtocolVersion version) Sets protocol version used in this context.
| |