1 10 package mondrian.xmla; 11 12 import java.util.Map ; 13 14 import javax.servlet.ServletConfig ; 15 import javax.servlet.ServletException ; 16 import javax.servlet.http.HttpServletRequest ; 17 import javax.servlet.http.HttpServletResponse ; 18 19 import org.w3c.dom.Element ; 20 21 22 31 public interface XmlaRequestCallback { 32 String AUTHORIZATION = "Authorization"; 33 String EXPECT = "Expect"; 34 String EXPECT_100_CONTINUE = "100-continue"; 35 36 public class Helper { 37 public static XmlaException authorizationException(Exception ex) { 38 return new XmlaException( 39 XmlaConstants.CLIENT_FAULT_FC, 40 XmlaConstants.CHH_AUTHORIZATION_CODE, 41 XmlaConstants.CHH_AUTHORIZATION_FAULT_FS, 42 ex); 43 } 44 45 51 public static void generatedExpectResponse( 52 HttpServletRequest request, 53 HttpServletResponse response, 54 Map <String , String > context) throws Exception 55 { 56 response.reset(); 57 response.setStatus(HttpServletResponse.SC_CONTINUE); 58 } 59 } 60 61 void init(ServletConfig servletConfig) throws ServletException ; 62 63 84 boolean processHttpHeader( 85 HttpServletRequest request, 86 HttpServletResponse response, 87 Map <String , String > context) throws Exception ; 88 89 94 void preAction( 95 HttpServletRequest request, 96 Element [] requestSoapParts, 97 Map <String , String > context) throws Exception ; 98 99 105 String generateSessionId(Map <String , String > context); 106 107 112 void postAction(HttpServletRequest request, 113 HttpServletResponse response, 114 byte[][] responseSoapParts, 115 Map <String , String > context) throws Exception ; 116 } 117 118 | Popular Tags |