public class SpringBasedContainer extends AbstractComponentRegistry implements Container
Constructor and Description |
---|
SpringBasedContainer(org.springframework.web.context.ConfigurableWebApplicationContext parentContext) |
Modifier and Type | Method and Description |
---|---|
<T> boolean |
canProvide(java.lang.Class<T> type)
Verifies if this container can provide an instance for
the given class.
|
<T> T |
instanceFor(java.lang.Class<T> type)
Retrieves the appropriate instance for the given class.
|
void |
register(java.lang.Class<?> requiredType,
java.lang.Class<?> componentType)
Registers a component to be used only when the required type is required.
|
void |
start(javax.servlet.ServletContext context) |
void |
stop() |
deepRegister
public SpringBasedContainer(org.springframework.web.context.ConfigurableWebApplicationContext parentContext)
public void register(java.lang.Class<?> requiredType, java.lang.Class<?> componentType)
ComponentRegistry
register
in interface ComponentRegistry
componentType
- the component typepublic <T> T instanceFor(java.lang.Class<T> type)
Container
instanceFor
in interface Container
type
- of the required componentpublic <T> boolean canProvide(java.lang.Class<T> type)
Container
canProvide
in interface Container
type
- of the required componentpublic void start(javax.servlet.ServletContext context)
public void stop()
Copyright © 2013 Caelum. All Rights Reserved.