org.abstracthorizon.extend.server.deployment.danube
Class DanubeWebApplicationContext

java.lang.Object
  extended by org.springframework.core.io.DefaultResourceLoader
      extended by org.springframework.context.support.AbstractApplicationContext
          extended by org.springframework.context.support.AbstractRefreshableApplicationContext
              extended by org.springframework.context.support.AbstractXmlApplicationContext
                  extended by org.abstracthorizon.extend.support.spring.deployment.AbstractApplicationContextModule
                      extended by org.abstracthorizon.extend.support.spring.service.ServiceApplicationContextModule
                          extended by org.abstracthorizon.extend.server.deployment.danube.DanubeWebApplicationContext
All Implemented Interfaces:
Module, BeanFactory, DisposableBean, HierarchicalBeanFactory, ListableBeanFactory, ApplicationContext, ApplicationEventPublisher, ConfigurableApplicationContext, Lifecycle, MessageSource, ResourceLoader, ResourcePatternResolver

public class DanubeWebApplicationContext
extends ServiceApplicationContextModule

Module that represents Danube web application.

Author:
Daniel Sendula

Nested Class Summary
 
Nested classes/interfaces inherited from class org.abstracthorizon.extend.support.spring.deployment.AbstractApplicationContextModule
AbstractApplicationContextModule.DeployersDefaultListableBeanFactory
 
Field Summary
protected  String contextPath
          Context path this web application is going to be deployed on
protected  org.abstracthorizon.danube.http.matcher.Prefix matcher
          "path" this context is deployed at root level with.
protected  ApplicationContext webServerContext
          Context
 
Fields inherited from class org.abstracthorizon.extend.support.spring.service.ServiceApplicationContextModule
serviceBeans
 
Fields inherited from class org.abstracthorizon.extend.support.spring.deployment.AbstractApplicationContextModule
dependOnThis, dependsOn, deploymentManager, internalClassLoader, moduleId, originalLocation, overallClassLoader, serviceFile, state, workingLocation
 
Fields inherited from class org.springframework.context.support.AbstractApplicationContext
APPLICATION_EVENT_MULTICASTER_BEAN_NAME, MESSAGE_SOURCE_BEAN_NAME
 
Fields inherited from interface org.abstracthorizon.extend.server.deployment.Module
CREATED, DEFINED, STARTED, UNDEFINED, WAITING_ON_CREATE, WAITING_ON_CREATE_TO_START, WAITING_ON_START
 
Fields inherited from interface org.springframework.beans.factory.BeanFactory
FACTORY_BEAN_PREFIX
 
Fields inherited from interface org.springframework.beans.factory.BeanFactory
FACTORY_BEAN_PREFIX
 
Fields inherited from interface org.springframework.core.io.support.ResourcePatternResolver
CLASSPATH_ALL_URL_PREFIX
 
Fields inherited from interface org.springframework.core.io.ResourceLoader
CLASSPATH_URL_PREFIX
 
Constructor Summary
DanubeWebApplicationContext(ModuleId moduleId)
          Empty constructor.
 
Method Summary
protected  void createInternal()
          Sets this module dependancy on (danube's) module that created loader.
protected  void destroyInternal()
          Empty implementation
protected  String getContextFileName()
          Returns "web-application.xml"
 String getContextPath()
           
 ApplicationContext getWebServerContext()
          Returns web server's context
protected  void initBeanDefinitionReader(XmlBeanDefinitionReader xmlbeandefinitionreader)
          Sets up parser for this application context.
 void setContextPath(String contextPath)
           
 void setWebServerContext(ApplicationContext webServerContext)
          Sets web server's context
protected  void startInternal()
          Obtains reference to the "web-application" bean and uses it while creating Prefix matcher with context path.
protected  void stopInternal()
          Removes previously created matcher.
 
Methods inherited from class org.abstracthorizon.extend.support.spring.service.ServiceApplicationContextModule
getServiceBeans, setServiceBeans
 
Methods inherited from class org.abstracthorizon.extend.support.spring.deployment.AbstractApplicationContextModule
create, createBeanFactory, createClassLoaders, createServiceFile, destroy, equals, getClassLoader, getConfigLocations, 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.AbstractXmlApplicationContext
getConfigResources, loadBeanDefinitions, loadBeanDefinitions
 
Methods inherited from class org.springframework.context.support.AbstractRefreshableApplicationContext
closeBeanFactory, customizeBeanFactory, getBeanFactory, refreshBeanFactory
 
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
 
Methods inherited from class org.springframework.core.io.DefaultResourceLoader
getResourceByPath, setClassLoader
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

matcher

protected org.abstracthorizon.danube.http.matcher.Prefix matcher
"path" this context is deployed at root level with.


contextPath

protected String contextPath
Context path this web application is going to be deployed on


webServerContext

protected ApplicationContext webServerContext
Context

Constructor Detail

DanubeWebApplicationContext

public DanubeWebApplicationContext(ModuleId moduleId)
Empty constructor.

Method Detail

initBeanDefinitionReader

protected void initBeanDefinitionReader(XmlBeanDefinitionReader xmlbeandefinitionreader)
Sets up parser for this application context. This implementation uses DanubeWarModuleXmlParser without validation with AbstractApplicationContextModule.internalClassLoader.

Overrides:
initBeanDefinitionReader in class ServiceApplicationContextModule

createInternal

protected void createInternal()
Sets this module dependancy on (danube's) module that created loader.

Overrides:
createInternal in class ServiceApplicationContextModule

startInternal

protected void startInternal()
Obtains reference to the "web-application" bean and uses it while creating Prefix matcher with context path. Context path is or one supplied through "<context-path>" tag or name of the module if tag is not specified. Newly created matcher is then added to the http server connection handler.

Overrides:
startInternal in class ServiceApplicationContextModule

stopInternal

protected void stopInternal()
Removes previously created matcher.

Overrides:
stopInternal in class ServiceApplicationContextModule

destroyInternal

protected void destroyInternal()
Empty implementation

Overrides:
destroyInternal in class ServiceApplicationContextModule

getContextFileName

protected String getContextFileName()
Returns "web-application.xml"

Overrides:
getContextFileName in class AbstractApplicationContextModule
Returns:
"web-application.xml"

getWebServerContext

public ApplicationContext getWebServerContext()
Returns web server's context

Returns:
web server's context

setWebServerContext

public void setWebServerContext(ApplicationContext webServerContext)
Sets web server's context

Parameters:
webServerContext - web server's context

getContextPath

public String getContextPath()
Returns:
Returns the contextPath.

setContextPath

public void setContextPath(String contextPath)
Parameters:
contextPath - The contextPath to set.


Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.