public final class ThreadLocalHttpContext extends Object implements HttpContext
HttpContext using ThreadLocal
to store HttpRequestContext and HttpResponseContext instances
associated with threads.| Constructor and Description |
|---|
ThreadLocalHttpContext() |
| Modifier and Type | Method and Description |
|---|---|
HttpContext |
get() |
Map<String,Object> |
getProperties()
Get the mutable properties.
|
HttpRequestContext |
getRequest()
Get the HTTP request information.
|
HttpResponseContext |
getResponse()
Get the HTTP response information.
|
ExtendedUriInfo |
getUriInfo()
Get the extended URI information.
|
boolean |
isTracingEnabled()
Check if tracing is enabled.
|
void |
set(HttpContext context)
Set the
HttpContext for the current thread. |
void |
trace(String message)
Add a trace message.
|
public void set(HttpContext context)
HttpContext for the current thread.public HttpContext get()
public ExtendedUriInfo getUriInfo()
HttpContextgetUriInfo in interface HttpContextpublic HttpRequestContext getRequest()
HttpContextgetRequest in interface HttpContextpublic HttpResponseContext getResponse()
HttpContextgetResponse in interface HttpContextpublic Map<String,Object> getProperties()
HttpContextCare should be taken not to clear the properties or remove properties that are unknown otherwise unspecified behaviour may result.
getProperties in interface HttpContextpublic boolean isTracingEnabled()
TraceableisTracingEnabled in interface Traceablepublic void trace(String message)
Traceable
A trace message will be added if Traceable.isTracingEnabled() returns
true and tracing contraints are satisfied.
Copyright © 2014 Oracle Corporation. All rights reserved.