public enum Scope extends Enum<Scope>
Modifier and Type | Class and Description |
---|---|
static interface |
Scope.Strategy
Pluggable scoping strategy.
|
Enum Constant and Description |
---|
PROTOTYPE
One instance per injection.
|
REQUEST
One instance per request.
|
SESSION
One instance per session.
|
SINGLETON
One instance per container.
|
THREAD
One instance per thread.
|
WIZARD
One instance per wizard.
|
Modifier and Type | Method and Description |
---|---|
static Scope |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Scope[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Scope PROTOTYPE
public static final Scope SINGLETON
public static final Scope THREAD
One instance per thread.
Note: if a thread local object strongly references its Container
, neither the Container
nor the object will be
eligible for garbage collection, i.e. memory leak.
public static final Scope REQUEST
public static final Scope SESSION
public static final Scope WIZARD
public static Scope[] values()
for (Scope c : Scope.values()) System.out.println(c);
public static Scope 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 © 2000–2020 Apache Software Foundation. All rights reserved.