Package mondrian.xmla
Class XmlaBaseTestCase.XmlaRequestCallbackImpl
- java.lang.Object
-
- mondrian.xmla.XmlaBaseTestCase.XmlaRequestCallbackImpl
-
- All Implemented Interfaces:
XmlaRequestCallback
- Direct Known Subclasses:
XmlaExcel2000Test.Callback,XmlaExcel2007Test.Callback,XmlaExcelXPTest.Callback
- Enclosing class:
- XmlaBaseTestCase
protected abstract static class XmlaBaseTestCase.XmlaRequestCallbackImpl extends Object implements XmlaRequestCallback
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface mondrian.xmla.XmlaRequestCallback
XmlaRequestCallback.Helper
-
-
Field Summary
-
Fields inherited from interface mondrian.xmla.XmlaRequestCallback
AUTHORIZATION, EXPECT, EXPECT_100_CONTINUE
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedXmlaRequestCallbackImpl(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgenerateSessionId(Map<String,Object> context)The Callback is requested to generate a sequence id string.voidinit(ServletConfig servletConfig)voidpostAction(HttpServletRequest request, HttpServletResponse response, byte[][] responseSoapParts, Map<String,Object> context)This is called after all Mondrian processing (DISCOVER/EXECUTE) has occurred.voidpreAction(HttpServletRequest request, Element[] requestSoapParts, Map<String,Object> context)This is called after the headers have been process but before the body (DISCOVER/EXECUTE) has been processed.booleanprocessHttpHeader(HttpServletRequest request, HttpServletResponse response, Map<String,Object> context)Process the request header items.
-
-
-
Constructor Detail
-
XmlaRequestCallbackImpl
protected XmlaRequestCallbackImpl(String name)
-
-
Method Detail
-
init
public void init(ServletConfig servletConfig) throws ServletException
- Specified by:
initin interfaceXmlaRequestCallback- Throws:
ServletException
-
processHttpHeader
public boolean processHttpHeader(HttpServletRequest request, HttpServletResponse response, Map<String,Object> context) throws Exception
Description copied from interface:XmlaRequestCallbackProcess the request header items. Specifically if present the Authorization and Expect headers. If the Authorization header is present, then the callback can validate the user/password. If authentication fails, the callback should throw an XmlaException with the correct XmlaConstants values. The XmlaRequestCallback.Helper class contains the authorizationException method that can be used by a callback to generate the XmlaException with the correct values. If the Expect header is set with "100-continue", then it is upto the callback to create the appropriate response and return false. In this case, the XmlaServlet stops processing and returns the response to the client application. To facilitate the generation of the response, the XmlaRequestCallback.Helper has the method generatedExpectResponse that can be called by the callback.Note that it is upto the XMLA client to determine whether or not there is an Expect header entry (ADOMD.NET seems to like to do this).
- Specified by:
processHttpHeaderin interfaceXmlaRequestCallback- Returns:
- true if XmlaServlet handling is to continue and false if there was an Expect header "100-continue".
- Throws:
Exception
-
preAction
public void preAction(HttpServletRequest request, Element[] requestSoapParts, Map<String,Object> context) throws Exception
Description copied from interface:XmlaRequestCallbackThis is called after the headers have been process but before the body (DISCOVER/EXECUTE) has been processed.- Specified by:
preActionin interfaceXmlaRequestCallback- Throws:
Exception
-
generateSessionId
public String generateSessionId(Map<String,Object> context)
Description copied from interface:XmlaRequestCallbackThe Callback is requested to generate a sequence id string. This sequence id was requested by the XMLA client and will be used for all subsequent communications in the Soap Header block. Implementation can returnnullif they do not want to generate a custom session ID, in which case, the default algorithm to generate session IDs will be used.- Specified by:
generateSessionIdin interfaceXmlaRequestCallback- Parameters:
context- The context of this query.- Returns:
- An arbitrary session id to use, or
null.
-
postAction
public void postAction(HttpServletRequest request, HttpServletResponse response, byte[][] responseSoapParts, Map<String,Object> context) throws Exception
Description copied from interface:XmlaRequestCallbackThis is called after all Mondrian processing (DISCOVER/EXECUTE) has occurred.- Specified by:
postActionin interfaceXmlaRequestCallback- Throws:
Exception
-
-