|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ContextScope<C>
A scope that looks up providers in a current context, using itself as a provider for the context.
| Method Summary | ||
|---|---|---|
void |
close(C context,
ContextCloseHandler<?>... closeHandlers)
Closes the given context. |
|
void |
closeAll(ContextCloseHandler<?>... closeHandlers)
Closes all open contexts. |
|
C |
get()
The context identifier used to look up an instance registry. |
|
java.util.List<com.google.inject.Key<?>> |
getKeysInScope()
The keys bound in this scope. |
|
java.util.Collection<C> |
getOpenContexts()
The context identifiers of all open contexts that this scope knows about. |
|
|
scope(com.google.inject.Key<T> key,
com.google.inject.Provider<T> creator)
Returns a provider that finds the instance registry corresponding to the current context and returns the object registered with the given key, creating it if it doesn't exist in the registry. |
|
java.lang.Class<C> |
type()
The type of object used as a context identifier. |
|
| Methods inherited from interface com.google.inject.Scope |
|---|
toString |
| Method Detail |
|---|
<T> com.google.inject.Provider<T> scope(com.google.inject.Key<T> key,
com.google.inject.Provider<T> creator)
scope in interface com.google.inject.ScopeC get()
get in interface com.google.inject.Provider<C>java.lang.Class<C> type()
java.util.List<com.google.inject.Key<?>> getKeysInScope()
java.util.Collection<C> getOpenContexts()
void close(C context,
ContextCloseHandler<?>... closeHandlers)
void closeAll(ContextCloseHandler<?>... closeHandlers)
|
Copyright ¬ 2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||