org.springframework.boot.web.context

Interface WebServerApplicationContext

    • Field Summary

      • 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
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method and Description
      java.lang.String getServerNamespace()
      Returns the namespace of the web server application context or null if no namespace has been set.
      static java.lang.String getServerNamespace(org.springframework.context.ApplicationContext context)
      Returns the server namespace if the specified context is a WebServerApplicationContext.
      WebServer getWebServer()
      Returns the WebServer that was created by the context or null if the server has not yet been created.
      static boolean hasServerNamespace(org.springframework.context.ApplicationContext context, java.lang.String serverNamespace)
      Returns true if the specified context is a WebServerApplicationContext with a matching server namespace.
      • Methods inherited from interface org.springframework.context.ApplicationContext

        getApplicationName, getAutowireCapableBeanFactory, getDisplayName, getId, getParent, getStartupDate
      • Methods inherited from interface org.springframework.core.env.EnvironmentCapable

        getEnvironment
      • Methods inherited from interface org.springframework.beans.factory.ListableBeanFactory

        containsBeanDefinition, findAnnotationOnBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanNamesForAnnotation, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanProvider, getBeanProvider, getBeansOfType, getBeansOfType, getBeansWithAnnotation
      • Methods inherited from interface org.springframework.beans.factory.HierarchicalBeanFactory

        containsLocalBean, getParentBeanFactory
      • Methods inherited from interface org.springframework.beans.factory.BeanFactory

        containsBean, getAliases, getBean, getBean, getBean, getBean, getBean, getBeanProvider, getBeanProvider, getType, getType, isPrototype, isSingleton, isTypeMatch, isTypeMatch
      • Methods inherited from interface org.springframework.context.MessageSource

        getMessage, getMessage, getMessage
      • Methods inherited from interface org.springframework.context.ApplicationEventPublisher

        publishEvent, publishEvent
      • Methods inherited from interface org.springframework.core.io.support.ResourcePatternResolver

        getResources
      • Methods inherited from interface org.springframework.core.io.ResourceLoader

        getClassLoader, getResource
    • Method Detail

      • getWebServer

        WebServer getWebServer()
        Returns the WebServer that was created by the context or null if the server has not yet been created.
        Returns:
        the web server
      • getServerNamespace

        java.lang.String getServerNamespace()
        Returns the namespace of the web server application context or null if 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
      • hasServerNamespace

        static boolean hasServerNamespace(org.springframework.context.ApplicationContext context,
                                          java.lang.String serverNamespace)
        Returns true if the specified context is a WebServerApplicationContext with a matching server namespace.
        Parameters:
        context - the context to check
        serverNamespace - the server namespace to match against
        Returns:
        true if the server namespace of the context matches
        Since:
        2.1.8
      • getServerNamespace

        static java.lang.String getServerNamespace(org.springframework.context.ApplicationContext context)
        Returns the server namespace if the specified context is a WebServerApplicationContext.
        Parameters:
        context - the context
        Returns:
        the server namespace or null if the context is not a WebServerApplicationContext
        Since:
        2.6.0