org.springframework.boot.web.servlet

Class DynamicRegistrationBean<D extends javax.servlet.Registration.Dynamic>

    • Field Summary

      • Fields inherited from interface org.springframework.core.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      void addInitParameter(java.lang.String name, java.lang.String value)
      Add a single init-parameter, replacing any existing parameter with the same name.
      protected abstract D addRegistration(java.lang.String description, javax.servlet.ServletContext servletContext) 
      protected void configure(D registration) 
      java.util.Map<java.lang.String,java.lang.String> getInitParameters()
      Returns a mutable Map of the registration init-parameters.
      protected java.lang.String getOrDeduceName(java.lang.Object value)
      Deduces the name for this registration.
      boolean isAsyncSupported()
      Returns if asynchronous operations are supported for this registration.
      protected void register(java.lang.String description, javax.servlet.ServletContext servletContext)
      Register this bean with the servlet context.
      void setAsyncSupported(boolean asyncSupported)
      Sets if asynchronous operations are supported for this registration.
      void setInitParameters(java.util.Map<java.lang.String,java.lang.String> initParameters)
      Set init-parameters for this registration.
      void setName(java.lang.String name)
      Set the name of this registration.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DynamicRegistrationBean

        public DynamicRegistrationBean()
    • Method Detail

      • setName

        public void setName(java.lang.String name)
        Set the name of this registration. If not specified the bean name will be used.
        Parameters:
        name - the name of the registration
      • setAsyncSupported

        public void setAsyncSupported(boolean asyncSupported)
        Sets if asynchronous operations are supported for this registration. If not specified defaults to true.
        Parameters:
        asyncSupported - if async is supported
      • isAsyncSupported

        public boolean isAsyncSupported()
        Returns if asynchronous operations are supported for this registration.
        Returns:
        if async is supported
      • setInitParameters

        public void setInitParameters(java.util.Map<java.lang.String,java.lang.String> initParameters)
        Set init-parameters for this registration. Calling this method will replace any existing init-parameters.
        Parameters:
        initParameters - the init parameters
        See Also:
        getInitParameters(), addInitParameter(java.lang.String, java.lang.String)
      • getInitParameters

        public java.util.Map<java.lang.String,java.lang.String> getInitParameters()
        Returns a mutable Map of the registration init-parameters.
        Returns:
        the init parameters
      • addInitParameter

        public void addInitParameter(java.lang.String name,
                                     java.lang.String value)
        Add a single init-parameter, replacing any existing parameter with the same name.
        Parameters:
        name - the init-parameter name
        value - the init-parameter value
      • register

        protected final void register(java.lang.String description,
                                      javax.servlet.ServletContext servletContext)
        Description copied from class: RegistrationBean
        Register this bean with the servlet context.
        Specified by:
        register in class RegistrationBean
        Parameters:
        description - a description of the item being registered
        servletContext - the servlet context
      • addRegistration

        protected abstract D addRegistration(java.lang.String description,
                                             javax.servlet.ServletContext servletContext)
      • configure

        protected void configure(D registration)
      • getOrDeduceName

        protected final java.lang.String getOrDeduceName(java.lang.Object value)
        Deduces the name for this registration. Will return user specified name or fallback to convention based naming.
        Parameters:
        value - the object used for convention based names
        Returns:
        the deduced name