@Builtin @Singleton @Name(value="org.eiichiro.jaguar.scope.SingletonContext") public class SingletonContext extends Object implements Context
Context
implementation corresponding to the
Singleton
scope.
SingletonContext
stores a component in static global store. So the
components stored in this context are sustained in per-ClassLoader
.Constructor and Description |
---|
SingletonContext() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears component store.
|
<T> T |
get(Descriptor<T> descriptor)
Returns the component corresponding to the specified
Descriptor
from the static global store. |
<T> void |
put(Descriptor<T> descriptor,
T component)
Puts the specified component and descriptor pair into the static global
store.
|
Object |
store()
Returns the component store this context manages.
|
public <T> T get(Descriptor<T> descriptor)
Descriptor
from the static global store.get
in interface Context
T
- The component type.descriptor
- The descriptor corresponding to the component.Descriptor
.public <T> void put(Descriptor<T> descriptor, T component)
public void clear()
Passivated
event then Destroyed
event on the
components.Copyright © 2011-2014 Eiichiro Uchiumi. All Rights Reserved.