|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.directwebremoting.guice.AbstractContextScope<C,java.util.concurrent.ConcurrentMap>
org.directwebremoting.guice.AbstractMapContextScope<C>
public abstract class AbstractMapContextScope<C>
A specialization of AbstractContextScope using a concurrent map
to hold registered instance providers. Concrete implementations must
define get() to return the current context, and they must call
super(C.class) in constructors.
| Method Summary | ||
|---|---|---|
abstract C |
get()
The context identifier used to look up an instance registry. |
|
|
get(java.util.concurrent.ConcurrentMap 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. |
|
|
putIfAbsent(java.util.concurrent.ConcurrentMap 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. |
|
java.util.concurrent.ConcurrentMap |
registryFor(C context)
Returns the registry object associated with the given context. |
|
|
remove(java.util.concurrent.ConcurrentMap 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,java.util.concurrent.ConcurrentMap>public java.util.concurrent.ConcurrentMap registryFor(C context)
ContextRegistry
public <T> InstanceProvider<T> get(java.util.concurrent.ConcurrentMap registry,
com.google.inject.Key<T> key,
java.lang.String keyString)
ContextRegistry
public <T> InstanceProvider<T> putIfAbsent(java.util.concurrent.ConcurrentMap registry,
com.google.inject.Key<T> key,
java.lang.String keyString,
InstanceProvider<T> creator)
ContextRegistry
public <T> boolean remove(java.util.concurrent.ConcurrentMap registry,
com.google.inject.Key<T> key,
java.lang.String keyString,
InstanceProvider<T> creator)
ContextRegistrycreator.
|
Copyright ¬ 2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||