Package io.avaje.inject
Interface RequestScopeBuilder
public interface RequestScopeBuilder
Builder for RequestScope.
When building a request scope we can provide additional instances that can then we wired as dependencies to request scoped beans.
-
Method Summary
Modifier and Type Method Description RequestScopebuild()Build and return the request scope.<D> RequestScopeBuilderwithBean(Class<D> type, D bean)Provide a bean that can be dependency of a request scoped bean.<D> RequestScopeBuilderwithBean(String name, Class<D> type, D bean)Provide a bean that can be dependency of a request scoped bean.
-
Method Details
-
withBean
Provide a bean that can be dependency of a request scoped bean.- Parameters:
type- The type of provided beanbean- The instance being provided- Returns:
- The builder
-
withBean
Provide a bean that can be dependency of a request scoped bean.- Parameters:
name- The qualifier name of the provided beantype- The type of provided beanbean- The instance being provided- Returns:
- The builder
-
build
Build and return the request scope.
-