Package org.apache.struts2.inject
Interface Scope.Strategy
- Enclosing class:
- Scope
public static interface Scope.Strategy
Pluggable scoping strategy. Enables users to provide custom
 implementations of request, session, and wizard scopes. Implement and
 pass to 
Container.setScopeStrategy(Scope.Strategy).- 
Method SummaryModifier and TypeMethodDescription<T> TfindInRequest(Class<T> type, String name, Callable<? extends T> factory) Finds an object for the given type and name in the request scope.<T> TfindInSession(Class<T> type, String name, Callable<? extends T> factory) Finds an object for the given type and name in the session scope.<T> TfindInWizard(Class<T> type, String name, Callable<? extends T> factory) Finds an object for the given type and name in the wizard scope.
- 
Method Details- 
findInRequestFinds an object for the given type and name in the request scope. Creates a new object if necessary using the given factory.- Type Parameters:
- T- generic type
- Parameters:
- type- type of object
- name- name of object
- factory- factory
- Returns:
- the object for the given type and name in the request scope
- Throws:
- Exception- in case of any error
 
- 
findInSessionFinds an object for the given type and name in the session scope. Creates a new object if necessary using the given factory.- Type Parameters:
- T- generic type
- Parameters:
- type- type of object
- name- name of object
- factory- factory
- Returns:
- the object for the given type and name in the session scope
- Throws:
- Exception- in case of any error
 
- 
findInWizardFinds an object for the given type and name in the wizard scope. Creates a new object if necessary using the given factory.- Type Parameters:
- T- generic type
- Parameters:
- type- type of object
- name- name of object
- factory- factory
- Returns:
- the object for the given type and name in the wizard scope
- Throws:
- Exception- in case of any error
 
 
-