Save This Page
Home » xwork-2.1.5 » com.opensymphony » xwork2 » inject » [javadoc | source]
com.opensymphony.xwork2.inject
public enum class: Scope [javadoc | source]
java.lang.Enum
   com.opensymphony.xwork2.inject.Scope
Scope of an injected objects.
Nested Class Summary:
public interface  Scope.Strategy  Pluggable scoping strategy. Enables users to provide custom implementations of request, session, and wizard scopes. Implement and pass to {@link Container#setScopeStrategy(com.opensymphony.xwork2.inject.Scope.Strategy)}. 
Field Summary
public  Scope DEFAULT    One instance per injection. 
public  Scope SINGLETON    One instance per container. 
public  Scope THREAD    One instance per thread.

Note: if a thread local object strongly references its Container , neither the {@code Container} nor the object will be eligible for garbage collection, i.e. memory leak. 

public  Scope REQUEST    One instance per request. 
public  Scope SESSION    One instance per session. 
public  Scope WIZARD    One instance per wizard. 
Method from com.opensymphony.xwork2.inject.Scope Summary:
scopeFactory,   toCallable
Method from com.opensymphony.xwork2.inject.Scope Detail:
 abstract InternalFactory<? extends T> scopeFactory(Class<T> type,
    String name,
    InternalFactory<? extends T> factory)
    Wraps factory with scoping logic.
 public Callable<? extends T> toCallable(InternalContext context,
    InternalFactory<? extends T> factory)