org.abstracthorizon.extend.support.spring.service
Class ServiceApplicationContextModule
java.lang.Object
org.springframework.core.io.DefaultResourceLoader
org.springframework.context.support.AbstractApplicationContext
org.springframework.context.support.AbstractRefreshableApplicationContext
org.springframework.context.support.AbstractXmlApplicationContext
org.abstracthorizon.extend.support.spring.deployment.AbstractApplicationContextModule
org.abstracthorizon.extend.support.spring.service.ServiceApplicationContextModule
- All Implemented Interfaces:
- Module, BeanFactory, DisposableBean, HierarchicalBeanFactory, ListableBeanFactory, ApplicationContext, ApplicationEventPublisher, ConfigurableApplicationContext, Lifecycle, MessageSource, ResourceLoader, ResourcePatternResolver
- Direct Known Subclasses:
- DanubeWebApplicationContext, JettyWebApplicationContext, TomcatWebApplicationContext
public class ServiceApplicationContextModule
- extends AbstractApplicationContextModule
Module that represents a service. It tracks service beans (beans marked with <service>
tag). When module is created/started/stopped/destroyed then create/start/stop/destroy method is called on all service beans.
Note: actual method name can be specified in <service> tag.
- Author:
- Daniel Sendula
Methods inherited from class org.abstracthorizon.extend.support.spring.deployment.AbstractApplicationContextModule |
create, createBeanFactory, createClassLoaders, createServiceFile, destroy, equals, getClassLoader, getConfigLocations, getContextFileName, getDependOnThis, getDependsOn, getDeploymentManager, getModuleId, getOriginalLocation, getResource, getServiceFile, getState, getStateAsString, getWorkingLocation, processDependencies, setDeploymentManager, setLocation, setModuleId, setOriginalLocation, setState, start, stop, toString |
Methods inherited from class org.springframework.context.support.AbstractApplicationContext |
addApplicationListener, addBeanFactoryPostProcessor, addListener, close, containsBean, containsBeanDefinition, containsLocalBean, destroyBeans, doClose, getAliases, getApplicationListeners, getAutowireCapableBeanFactory, getBean, getBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanFactoryPostProcessors, getBeanNamesForType, getBeanNamesForType, getBeansOfType, getBeansOfType, getDisplayName, getInternalParentBeanFactory, getInternalParentMessageSource, getLifecycleBeans, getMessage, getMessage, getMessage, getParent, getParentBeanFactory, getResourcePatternResolver, getResources, getStartupDate, getType, initApplicationEventMulticaster, initMessageSource, invokeBeanFactoryPostProcessors, isActive, isPrototype, isRunning, isSingleton, isTypeMatch, obtainFreshBeanFactory, onClose, onRefresh, postProcessBeanFactory, prepareBeanFactory, prepareRefresh, publishEvent, refresh, registerBeanPostProcessors, registerListeners, registerShutdownHook, setDisplayName, setParent |
serviceBeans
protected Set<ServiceBean> serviceBeans
- List of service beans
ServiceApplicationContextModule
public ServiceApplicationContextModule(ModuleId moduleId)
- Empty constructor
initBeanDefinitionReader
protected void initBeanDefinitionReader(XmlBeanDefinitionReader xmlbeandefinitionreader)
- Sets up parser for this application context.
This implementation uses
ServiceApplicationContextModuleXmlParser
without validation
with AbstractApplicationContextModule.internalClassLoader
.
- Overrides:
initBeanDefinitionReader
in class AbstractApplicationContextModule
createInternal
protected void createInternal()
- Invokes create method on all service beans
- Specified by:
createInternal
in class AbstractApplicationContextModule
startInternal
protected void startInternal()
- Invokes start method on all service beans
- Specified by:
startInternal
in class AbstractApplicationContextModule
stopInternal
protected void stopInternal()
- Invokes stop method on all service beans
- Specified by:
stopInternal
in class AbstractApplicationContextModule
destroyInternal
protected void destroyInternal()
- Invokes destroy method on all service beans
- Specified by:
destroyInternal
in class AbstractApplicationContextModule
getServiceBeans
public Set<ServiceBean> getServiceBeans()
- Returns:
- Returns the serviceBeans.
setServiceBeans
public void setServiceBeans(Set<ServiceBean> serviceBeans)
- Parameters:
serviceBeans
- The serviceBeans to set.
Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.