Interface WebServerApplicationContext
- All Superinterfaces:
- ApplicationContext,- ApplicationEventPublisher,- BeanFactory,- EnvironmentCapable,- HierarchicalBeanFactory,- ListableBeanFactory,- MessageSource,- ResourceLoader,- ResourcePatternResolver
- All Known Subinterfaces:
- ConfigurableWebServerApplicationContext
- All Known Implementing Classes:
- AnnotationConfigReactiveWebServerApplicationContext,- AnnotationConfigServletWebServerApplicationContext,- ReactiveWebServerApplicationContext,- ServletWebServerApplicationContext,- XmlServletWebServerApplicationContext
Interface to be implemented by 
application contexts that
 create and manage the lifecycle of an embedded WebServer.- Since:
- 2.0.0
- Author:
- Phillip Webb
- 
Field SummaryFields inherited from interface org.springframework.beans.factory.BeanFactoryFACTORY_BEAN_PREFIXFields inherited from interface org.springframework.core.io.ResourceLoaderCLASSPATH_URL_PREFIXFields inherited from interface org.springframework.core.io.support.ResourcePatternResolverCLASSPATH_ALL_URL_PREFIX
- 
Method SummaryModifier and TypeMethodDescriptionReturns the namespace of the web server application context ornullif no namespace has been set.static StringgetServerNamespace(ApplicationContext context) Returns the server namespace if the specified context is aWebServerApplicationContext.Returns theWebServerthat was created by the context ornullif the server has not yet been created.static booleanhasServerNamespace(ApplicationContext context, String serverNamespace) Returnstrueif the specified context is aWebServerApplicationContextwith a matching server namespace.Methods inherited from interface org.springframework.context.ApplicationContextgetApplicationName, getAutowireCapableBeanFactory, getDisplayName, getId, getParent, getStartupDateMethods inherited from interface org.springframework.context.ApplicationEventPublisherpublishEvent, publishEventMethods inherited from interface org.springframework.beans.factory.BeanFactorycontainsBean, getAliases, getBean, getBean, getBean, getBean, getBean, getBeanProvider, getBeanProvider, getType, getType, isPrototype, isSingleton, isTypeMatch, isTypeMatchMethods inherited from interface org.springframework.core.env.EnvironmentCapablegetEnvironmentMethods inherited from interface org.springframework.beans.factory.HierarchicalBeanFactorycontainsLocalBean, getParentBeanFactoryMethods inherited from interface org.springframework.beans.factory.ListableBeanFactorycontainsBeanDefinition, findAllAnnotationsOnBean, findAnnotationOnBean, findAnnotationOnBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanNamesForAnnotation, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanProvider, getBeanProvider, getBeansOfType, getBeansOfType, getBeansWithAnnotationMethods inherited from interface org.springframework.context.MessageSourcegetMessage, getMessage, getMessageMethods inherited from interface org.springframework.core.io.ResourceLoadergetClassLoader, getResourceMethods inherited from interface org.springframework.core.io.support.ResourcePatternResolvergetResources
- 
Method Details- 
getWebServerWebServer getWebServer()Returns theWebServerthat was created by the context ornullif the server has not yet been created.- Returns:
- the web server
 
- 
getServerNamespaceString getServerNamespace()Returns the namespace of the web server application context ornullif no namespace has been set. Used for disambiguation when multiple web servers are running in the same application (for example a management context running on a different port).- Returns:
- the server namespace
 
- 
hasServerNamespaceReturnstrueif the specified context is aWebServerApplicationContextwith a matching server namespace.- Parameters:
- context- the context to check
- serverNamespace- the server namespace to match against
- Returns:
- trueif the server namespace of the context matches
- Since:
- 2.1.8
 
- 
getServerNamespaceReturns the server namespace if the specified context is aWebServerApplicationContext.- Parameters:
- context- the context
- Returns:
- the server namespace or nullif the context is not aWebServerApplicationContext
- Since:
- 2.6.0
 
 
-