org.springframework.mock.web

Class MockFilterConfig

  • java.lang.Object
    • org.springframework.mock.web.MockFilterConfig
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addInitParameter(java.lang.String name, java.lang.String value) 
      java.lang.String getFilterName()
      Returns the filter-name of this filter as defined in the deployment descriptor.
      java.lang.String getInitParameter(java.lang.String name)
      Returns a String containing the value of the named initialization parameter, or null if the initialization parameter does not exist.
      java.util.Enumeration<java.lang.String> getInitParameterNames()
      Returns the names of the filter's initialization parameters as an Enumeration of String objects, or an empty Enumeration if the filter has no initialization parameters.
      ServletContext getServletContext()
      Returns a reference to the ServletContext in which the caller is executing.
      • Methods inherited from class java.lang.Object

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

      • MockFilterConfig

        public MockFilterConfig()
        Create a new MockFilterConfig with a default MockServletContext.
      • MockFilterConfig

        public MockFilterConfig(java.lang.String filterName)
        Create a new MockFilterConfig with a default MockServletContext.
        Parameters:
        filterName - the name of the filter
      • MockFilterConfig

        public MockFilterConfig(@Nullable
                                ServletContext servletContext)
        Create a new MockFilterConfig.
        Parameters:
        servletContext - the ServletContext that the servlet runs in
      • MockFilterConfig

        public MockFilterConfig(@Nullable
                                ServletContext servletContext,
                                java.lang.String filterName)
        Create a new MockFilterConfig.
        Parameters:
        servletContext - the ServletContext that the servlet runs in
        filterName - the name of the filter
    • Method Detail

      • getFilterName

        public java.lang.String getFilterName()
        Description copied from interface: javax.servlet.FilterConfig
        Returns the filter-name of this filter as defined in the deployment descriptor.
        Specified by:
        getFilterName in interface FilterConfig
        Returns:
        the filter name of this filter
      • addInitParameter

        public void addInitParameter(java.lang.String name,
                                     java.lang.String value)
      • getInitParameter

        public java.lang.String getInitParameter(java.lang.String name)
        Description copied from interface: javax.servlet.FilterConfig
        Returns a String containing the value of the named initialization parameter, or null if the initialization parameter does not exist.
        Specified by:
        getInitParameter in interface FilterConfig
        Parameters:
        name - a String specifying the name of the initialization parameter
        Returns:
        a String containing the value of the initialization parameter, or null if the initialization parameter does not exist
      • getInitParameterNames

        public java.util.Enumeration<java.lang.String> getInitParameterNames()
        Description copied from interface: javax.servlet.FilterConfig
        Returns the names of the filter's initialization parameters as an Enumeration of String objects, or an empty Enumeration if the filter has no initialization parameters.
        Specified by:
        getInitParameterNames in interface FilterConfig
        Returns:
        an Enumeration of String objects containing the names of the filter's initialization parameters