|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.codehaus.waffle.registrar.pico.PicoRegistrar
public class PicoRegistrar
This Registrar is backed by PicoContainer for managing Dependency Injection. This registrar is passed to the custom registrar defined in the web.xml as a delegate.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.codehaus.waffle.registrar.Registrar |
|---|
Registrar.Injection |
| Constructor Summary | |
|---|---|
PicoRegistrar(org.picocontainer.MutablePicoContainer picoContainer,
ParameterResolver parameterResolver,
org.picocontainer.defaults.LifecycleStrategy lifecycleStrategy,
RegistrarMonitor registrarMonitor)
|
|
| Method Summary | |
|---|---|
void |
application()
Components registered in this method will be availables for the life of the Application. |
java.lang.Object |
getRegistered(java.lang.Object typeOrInstance)
Returns a registered component |
boolean |
isRegistered(java.lang.Object typeOrInstance)
Determines if a component is already registered |
Registrar |
register(java.lang.Class<?> type,
java.lang.Object... parameters)
Registers a component in the current context. |
Registrar |
register(java.lang.Object key,
java.lang.Class<?> type,
java.lang.Object... parameters)
Registers a component in the current context under the given key. |
void |
registerComponentAdapter(org.picocontainer.ComponentAdapter componentAdapter)
|
Registrar |
registerInstance(java.lang.Object instance)
Registers a component instance directly in the current context. |
Registrar |
registerInstance(java.lang.Object key,
java.lang.Object instance)
Registers a component instance directly in the current context under the given key. |
Registrar |
registerNonCaching(java.lang.Class<?> type,
java.lang.Object... parameters)
Registers a component in non-caching mode, ie with new instance created for each class with a defined dependency |
Registrar |
registerNonCaching(java.lang.Object key,
java.lang.Class<?> type,
java.lang.Object... parameters)
Registers a component under the given key in non-caching mode, ie with new instance created for each class with a defined dependency |
void |
registerRubyScript(java.lang.String key,
java.lang.String className)
Register a ruby script with Waffle |
void |
request()
Components registered in this method will be availables for the life of a request. |
void |
session()
Components registered in this method will be availables for the life of a Users session. |
Registrar |
useInjection(Registrar.Injection injection)
Use the given injection type for component instantiation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PicoRegistrar(org.picocontainer.MutablePicoContainer picoContainer,
ParameterResolver parameterResolver,
org.picocontainer.defaults.LifecycleStrategy lifecycleStrategy,
RegistrarMonitor registrarMonitor)
| Method Detail |
|---|
public Registrar useInjection(Registrar.Injection injection)
RegistrarInjection.CONSTRUCTOR.
useInjection in interface Registrarinjection - the Injection to use
public boolean isRegistered(java.lang.Object typeOrInstance)
Registrar
isRegistered in interface RegistrartypeOrInstance - the component Class type or Object instance/key
true if component is registeredpublic java.lang.Object getRegistered(java.lang.Object typeOrInstance)
Registrar
getRegistered in interface RegistrartypeOrInstance - the component Class type or Object instance/key
public Registrar register(java.lang.Class<?> type,
java.lang.Object... parameters)
Registrar
register in interface Registrartype - represents both the key and type the object will be registered underparameters - any parameters needed to satisfy the component being registered
public Registrar register(java.lang.Object key,
java.lang.Class<?> type,
java.lang.Object... parameters)
Registrar
register in interface Registrarkey - represents the key the object will be registered undertype - represents the component typeparameters - any parameters needed to satisfy the component being registered
public Registrar registerInstance(java.lang.Object instance)
Registrar
registerInstance in interface Registrarinstance - to be registered
public Registrar registerInstance(java.lang.Object key,
java.lang.Object instance)
Registrar
registerInstance in interface Registrarkey - the key the instance is to be registered underinstance - to be registered
public Registrar registerNonCaching(java.lang.Class<?> type,
java.lang.Object... parameters)
Registrar
registerNonCaching in interface Registrartype - represents both the key and type the object will be registered underparameters - any parameters needed to satisfy the component being registered
public Registrar registerNonCaching(java.lang.Object key,
java.lang.Class<?> type,
java.lang.Object... parameters)
Registrar
registerNonCaching in interface Registrarkey - represents the key the object will be registered undertype - represents the component typeparameters - any parameters needed to satisfy the component being registered
public void registerRubyScript(java.lang.String key,
java.lang.String className)
RubyAwareRegistrar
registerRubyScript in interface RubyAwareRegistrarkey - the name this script should be registred underclassName - represent the name of the Ruby class being registredpublic void registerComponentAdapter(org.picocontainer.ComponentAdapter componentAdapter)
public void application()
Registrar
application in interface RegistrarContextLevel.APPLICATION,
ServletContextListenerpublic void session()
Registrar
session in interface RegistrarContextLevel.SESSION,
HttpSessionListenerpublic void request()
Registrar
request in interface RegistrarContextLevel.REQUEST
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||