Package com.google.inject.servlet
Class ServletScopes.RequestScope
- java.lang.Object
-
- com.google.inject.servlet.ServletScopes.RequestScope
-
- All Implemented Interfaces:
Scope
- Enclosing class:
- ServletScopes
private static final class ServletScopes.RequestScope extends java.lang.Object implements Scope
-
-
Constructor Summary
Constructors Modifier Constructor Description privateRequestScope()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Provider<T>scope(Key<T> key, Provider<T> creator)Scopes a provider.java.lang.StringtoString()A short but useful description of this scope.
-
-
-
Method Detail
-
scope
public <T> Provider<T> scope(Key<T> key, Provider<T> creator)
Description copied from interface:ScopeScopes a provider. The returned provider returns objects from this scope. If an object does not exist in this scope, the provider can use the given unscoped provider to retrieve one.Scope implementations are strongly encouraged to override
Object.toString()in the returned provider and include the backing provider'stoString()output.
-
toString
public java.lang.String toString()
Description copied from interface:ScopeA short but useful description of this scope. For comparison, the standard scopes that ship with guice use the descriptions"Scopes.SINGLETON","ServletScopes.SESSION"and"ServletScopes.REQUEST".
-
-