|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.directwebremoting.guice.AbstractContextScope<C,C>
org.directwebremoting.guice.AbstractSimpleContextScope<C>
public abstract class AbstractSimpleContextScope<C>
A specialization of AbstractContextScope
for the case when
the context identifier itself can serve as a string-keyed instance registry
using synchronization on the context to provide atomic put-if-absent
and remove-specific-value behavior.
Method Summary | ||
---|---|---|
abstract C |
get()
The context identifier used to look up an instance registry. |
|
|
get(C registry,
com.google.inject.Key<T> key,
java.lang.String keyString)
Looks up an InstanceProvider for a key (either directly or using the precalculated key.toString() value) in a registry object, returning null if not found. |
|
abstract java.lang.Object |
get(C registry,
java.lang.String keyString)
|
|
|
put(C registry,
com.google.inject.Key<T> key,
java.lang.String keyString,
InstanceProvider<T> creator)
|
|
abstract void |
put(C registry,
java.lang.String keyString,
java.lang.Object creator)
|
|
|
putIfAbsent(C registry,
com.google.inject.Key<T> key,
java.lang.String keyString,
InstanceProvider<T> creator)
Looks up an InstanceProvider for a key (either directly or using the precalculated key.toString() value) in a registry object, returning null if not found, otherwise returning the existing value. |
|
C |
registryFor(C context)
Returns the registry object associated with the given context. |
|
|
remove(C registry,
com.google.inject.Key<T> key,
java.lang.String keyString,
InstanceProvider<T> creator)
Removes the registry entry for the given key (either directly or using the precalculated key.toString() value) from a registry object if the registered value is identical to creator . |
Methods inherited from class org.directwebremoting.guice.AbstractContextScope |
---|
close, closeAll, getKeysInScope, getOpenContexts, scope, toString, type |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public abstract C get()
ContextScope
get
in interface com.google.inject.Provider<C>
get
in interface ContextScope<C>
get
in class AbstractContextScope<C,C>
public abstract java.lang.Object get(C registry, java.lang.String keyString)
public abstract void put(C registry, java.lang.String keyString, java.lang.Object creator)
public C registryFor(C context)
ContextRegistry
public <T> InstanceProvider<T> get(C registry, com.google.inject.Key<T> key, java.lang.String keyString)
ContextRegistry
public <T> void put(C registry, com.google.inject.Key<T> key, java.lang.String keyString, InstanceProvider<T> creator)
public <T> InstanceProvider<T> putIfAbsent(C registry, com.google.inject.Key<T> key, java.lang.String keyString, InstanceProvider<T> creator)
ContextRegistry
public <T> boolean remove(C registry, com.google.inject.Key<T> key, java.lang.String keyString, InstanceProvider<T> creator)
ContextRegistry
creator
.
|
Copyright ? 2005 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |