Package io.microsphere.spring.web.util
Enum RequestContextStrategy
- java.lang.Object
-
- java.lang.Enum<RequestContextStrategy>
-
- io.microsphere.spring.web.util.RequestContextStrategy
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<RequestContextStrategy>
public enum RequestContextStrategy extends java.lang.Enum<RequestContextStrategy>
The enumeration of where theRequest Contextstores.- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
RequestAttributes
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DEFAULTDefault strategy keeps the originalRequestAttributesstorage strategyINHERITABLE_THREAD_LOCALInheritableThreadLocalstrategy stores theRequestAttributesinInheritableThreadLocalTHREAD_LOCALThreadLocalstrategy stores theRequestAttributesinThreadLocal
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RequestContextStrategyvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static RequestContextStrategy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DEFAULT
public static final RequestContextStrategy DEFAULT
Default strategy keeps the originalRequestAttributesstorage strategy
-
THREAD_LOCAL
public static final RequestContextStrategy THREAD_LOCAL
ThreadLocalstrategy stores theRequestAttributesinThreadLocal- See Also:
ThreadLocal,RequestContextHolder.setRequestAttributes(RequestAttributes)
-
INHERITABLE_THREAD_LOCAL
public static final RequestContextStrategy INHERITABLE_THREAD_LOCAL
InheritableThreadLocalstrategy stores theRequestAttributesinInheritableThreadLocal- See Also:
InheritableThreadLocal,RequestContextHolder.setRequestAttributes(RequestAttributes, boolean)
-
-
Method Detail
-
values
public static RequestContextStrategy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (RequestContextStrategy c : RequestContextStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RequestContextStrategy valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-