|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jersey.server.impl.ThreadLocalHttpContext
public final class ThreadLocalHttpContext
Implementation of HttpContext
using ThreadLocal
to store HttpRequestContext
and HttpResponseContext
instances
associated with threads.
Constructor Summary | |
---|---|
ThreadLocalHttpContext()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ThreadLocalHttpContext()
Method Detail |
---|
public void set(HttpContext context)
HttpContext
for the current thread.
public HttpContext get()
public ExtendedUriInfo getUriInfo()
HttpContext
getUriInfo
in interface HttpContext
public HttpRequestContext getRequest()
HttpContext
getRequest
in interface HttpContext
public HttpResponseContext getResponse()
HttpContext
getResponse
in interface HttpContext
public Map<String,Object> getProperties()
HttpContext
Care should be taken not to clear the properties or remove properties that are unknown otherwise unspecified behaviour may result.
getProperties
in interface HttpContext
public boolean isTracingEnabled()
Traceable
isTracingEnabled
in interface Traceable
public void trace(String message)
Traceable
A trace message will be added if Traceable.isTracingEnabled()
returns
true and tracing contraints are satisfied.
trace
in interface Traceable
message
- the trace message to add.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |