Package mondrian.xmla

Class XmlaServlet

    • Constructor Detail

      • XmlaServlet

        public XmlaServlet()
    • Method Detail

      • getBooleanInitParameter

        public static boolean getBooleanInitParameter​(javax.servlet.ServletConfig servletConfig,
                                                      String paramName)
        Returns true if paramName's value is not null and 'true'.
      • getParameter

        public static boolean getParameter​(javax.servlet.http.HttpServletRequest req,
                                           String paramName)
      • init

        public void init​(javax.servlet.ServletConfig servletConfig)
                  throws javax.servlet.ServletException
        Initializes servlet and XML/A handler.
        Specified by:
        init in interface javax.servlet.Servlet
        Overrides:
        init in class javax.servlet.GenericServlet
        Throws:
        javax.servlet.ServletException
      • createConnectionFactory

        protected abstract XmlaHandler.ConnectionFactory createConnectionFactory​(javax.servlet.ServletConfig servletConfig)
                                                                          throws javax.servlet.ServletException
        Throws:
        javax.servlet.ServletException
      • getXmlaHandler

        protected XmlaHandler getXmlaHandler()
        Gets (creating if needed) the XmlaHandler.
        Returns:
        XMLA handler
      • addCallback

        protected final void addCallback​(XmlaRequestCallback callback)
        Registers a callback.
      • getCallbacks

        protected final List<XmlaRequestCallback> getCallbacks()
        Returns the list of callbacks. The list is immutable.
        Returns:
        list of callbacks
      • doPost

        protected void doPost​(javax.servlet.http.HttpServletRequest request,
                              javax.servlet.http.HttpServletResponse response)
                       throws javax.servlet.ServletException,
                              IOException
        Main entry for HTTP post method
        Overrides:
        doPost in class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        IOException
      • unmarshallSoapMessage

        protected abstract void unmarshallSoapMessage​(javax.servlet.http.HttpServletRequest request,
                                                      Element[] requestSoapParts)
                                               throws XmlaException
        Implement to provide application specified SOAP unmarshalling algorithm.
        Throws:
        XmlaException
      • handleSoapHeader

        protected abstract void handleSoapHeader​(javax.servlet.http.HttpServletResponse response,
                                                 Element[] requestSoapParts,
                                                 byte[][] responseSoapParts,
                                                 Map<String,​Object> context)
                                          throws XmlaException
        Implement to handle application specified SOAP header.
        Throws:
        XmlaException
      • handleSoapBody

        protected abstract void handleSoapBody​(javax.servlet.http.HttpServletResponse response,
                                               Element[] requestSoapParts,
                                               byte[][] responseSoapParts,
                                               Map<String,​Object> context)
                                        throws XmlaException
        Implement to handle XML/A request.
        Throws:
        XmlaException
      • marshallSoapMessage

        protected abstract void marshallSoapMessage​(javax.servlet.http.HttpServletResponse response,
                                                    byte[][] responseSoapParts,
                                                    Enumeration.ResponseMimeType responseMimeType)
                                             throws XmlaException
        Implement to provide application specified SOAP marshalling algorithm.
        Throws:
        XmlaException
      • handleFault

        protected abstract void handleFault​(javax.servlet.http.HttpServletResponse response,
                                            byte[][] responseSoapParts,
                                            XmlaServlet.Phase phase,
                                            Throwable t)
        Implement to application specified handler of SOAP fualt.
      • initCharEncodingHandler

        protected void initCharEncodingHandler​(javax.servlet.ServletConfig servletConfig)
        Initialize character encoding
      • initCallbacks

        protected void initCallbacks​(javax.servlet.ServletConfig servletConfig)
        Registers callbacks configured in web.xml.