Package mondrian.tui

Class MockServletConfig

  • All Implemented Interfaces:
    ServletConfig

    public class MockServletConfig
    extends java.lang.Object
    implements ServletConfig
    This is a partial implementation of the ServletConfig where just enough is present to allow for communication between Mondrian's XMLA code and other code in the same JVM. Currently it is used in both the CmdRunner and in XMLA JUnit tests.

    If you need to add to this implementation, please do so.

    Author:
    Richard M. Emberson
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addInitParameter​(java.lang.String key, java.lang.String value)  
      java.lang.String getInitParameter​(java.lang.String key)
      Returns a String containing the value of the named initialization parameter, or null if the parameter does not exist.
      java.util.Enumeration getInitParameterNames()
      Returns the names of the servlet's initialization parameters as an Enumeration of String objects, or an empty Enumeration if the servlet has no initialization parameters.
      ServletContext getServletContext()
      Returns a reference to the ServletContext in which the servlet is executing.
      java.lang.String getServletName()
      Returns the name of this servlet instance.
      void setServletContext​(ServletContext servletContext)  
      void setServletName​(java.lang.String servletName)  
      • Methods inherited from class java.lang.Object

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

      • MockServletConfig

        public MockServletConfig()
      • MockServletConfig

        public MockServletConfig​(ServletContext servletContext)
    • Method Detail

      • getServletName

        public java.lang.String getServletName()
        Returns the name of this servlet instance.
        Specified by:
        getServletName in interface ServletConfig
      • getInitParameter

        public java.lang.String getInitParameter​(java.lang.String key)
        Returns a String containing the value of the named initialization parameter, or null if the parameter does not exist.
        Specified by:
        getInitParameter in interface ServletConfig
      • getInitParameterNames

        public java.util.Enumeration getInitParameterNames()
        Returns the names of the servlet's initialization parameters as an Enumeration of String objects, or an empty Enumeration if the servlet has no initialization parameters.
        Specified by:
        getInitParameterNames in interface ServletConfig
      • setServletName

        public void setServletName​(java.lang.String servletName)
      • addInitParameter

        public void addInitParameter​(java.lang.String key,
                                     java.lang.String value)
      • setServletContext

        public void setServletContext​(ServletContext servletContext)