public enum InstanceScope extends Enum<InstanceScope>
| Enum Constant and Description |
|---|
GLOBAL
Gives singleton instance across all application (in fact classloader)
|
INHERITABLE_THREAD_LOCAL
Gives thread specific instance for hierarchically connected threads (parent/child)
|
PROTOTYPE
Gives new fresh instance for every request
|
THREAD_LOCAL
Gives thread specific instance for each thread
|
| Modifier and Type | Method and Description |
|---|---|
static InstanceScope |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static InstanceScope[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final InstanceScope GLOBAL
public static final InstanceScope THREAD_LOCAL
public static final InstanceScope INHERITABLE_THREAD_LOCAL
public static final InstanceScope PROTOTYPE
public static InstanceScope[] values()
for (InstanceScope c : InstanceScope.values()) System.out.println(c);
public static InstanceScope valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2018. All Rights Reserved.