|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.web.HttpRequestLocal<T>
@Immutable public class HttpRequestLocal<T>
Per-request variable (similar to ThreadLocal
, but request-scoped).
Constructor Summary | |
---|---|
HttpRequestLocal(String name)
Creates a new HttpRequestLocal, specifying the name to use. |
Method Summary | |
---|---|
T |
get()
Returns the value of this HttpRequestLocal, or null if it is not set. |
protected T |
initialValue()
Returns the current request's "initial value" for this request-local variable. |
void |
remove()
Removes the value of this HttpRequestLocal. |
void |
set(T value)
Sets the value of this HttpRequestLocal. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpRequestLocal(String name)
name
- a String containing the attribute name to use in the servlet requestMethod Detail |
---|
public T get()
initialValue()
would have returned.
public void set(T value)
value
- the value to setpublic void remove()
protected T initialValue()
get()
method is called in a request.
This implementation simply returns null. Override this method for different initial values.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |