|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<Scope>
com.opensymphony.xwork2.inject.Scope
public enum Scope
Scope of an injected objects.
Nested Class Summary | |
---|---|
static interface |
Scope.Strategy
Pluggable scoping strategy. |
Enum Constant Summary | |
---|---|
DEFAULT
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. |
Method Summary | ||
---|---|---|
(package private) abstract
|
scopeFactory(Class<T> type,
String name,
InternalFactory<? extends T> factory)
Wraps factory with scoping logic. |
|
(package private)
|
toCallable(InternalContext context,
InternalFactory<? extends T> factory)
|
|
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're declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final Scope DEFAULT
public static final Scope SINGLETON
public static final Scope 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
Method Detail |
---|
public static final 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 name<T> Callable<? extends T> toCallable(InternalContext context, InternalFactory<? extends T> factory)
abstract <T> InternalFactory<? extends T> scopeFactory(Class<T> type, String name, InternalFactory<? extends T> factory)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |