| org.directwebremoting.guice.ContextScope
ContextScope | public interface ContextScope extends Scope,Provider<C>(Code) | | A scope that looks up providers in a current context, using itself as a
provider for the context.
author: Tim Peierls [tim at peierls dot net] |
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. | List<Key<?>> | getKeysInScope() The keys bound in this scope. | Collection<C> | getOpenContexts() The context identifiers of all open contexts that this
scope knows about. | Provider<T> | scope(Key<T> key, 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. | Class<C> | type() The type of object used as a context identifier. |
get | C get()(Code) | | The context identifier used to look up an instance registry.
The value returned is a function of the current context.
|
getKeysInScope | List<Key<?>> getKeysInScope()(Code) | | The keys bound in this scope.
|
getOpenContexts | Collection<C> getOpenContexts()(Code) | | The context identifiers of all open contexts that this
scope knows about.
|
scope | Provider<T> scope(Key<T> key, Provider<T> creator)(Code) | | 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.
|
type | Class<C> type()(Code) | | The type of object used as a context identifier.
|
|
|