|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.GenericServlet javax.servlet.http.HttpServlet mondrian.xmla.XmlaServlet
public abstract class XmlaServlet
Base XML/A servlet.
Nested Class Summary | |
---|---|
static class |
XmlaServlet.Phase
|
Field Summary | |
---|---|
protected CatalogLocator |
catalogLocator
|
protected String |
charEncoding
|
protected DataSourcesConfig.DataSources |
dataSources
|
static String |
DEFAULT_DATASOURCE_FILE
|
static String |
PARAM_CALLBACKS
|
static String |
PARAM_CHAR_ENCODING
|
static String |
PARAM_DATASOURCES_CONFIG
|
static String |
PARAM_OPTIONAL_DATASOURCE_CONFIG
|
protected XmlaHandler |
xmlaHandler
|
Constructor Summary | |
---|---|
XmlaServlet()
|
Method Summary | |
---|---|
protected void |
addCallback(XmlaRequestCallback callback)
Registers a callback. |
protected void |
addToDataSources(DataSourcesConfig.DataSources dataSources)
|
protected void |
doPost(HttpServletRequest request,
HttpServletResponse response)
Main entry for HTTP post method |
static boolean |
getBooleanInitParameter(ServletConfig servletConfig,
String paramName)
If paramName's value is not null and 'true', then return true. |
protected List<XmlaRequestCallback> |
getCallbacks()
Returns the list of callbacks. |
static boolean |
getParameter(HttpServletRequest req,
String paramName)
|
protected XmlaHandler |
getXmlaHandler()
Gets (creating if needed) the XmlaHandler. |
protected abstract void |
handleFault(HttpServletResponse response,
byte[][] responseSoapParts,
XmlaServlet.Phase phase,
Throwable t)
Implement to application specified handler of SOAP fualt. |
protected abstract void |
handleSoapBody(HttpServletResponse response,
Element[] requestSoapParts,
byte[][] responseSoapParts,
Map<String,Object> context)
Implement to handle XML/A request. |
protected abstract void |
handleSoapHeader(HttpServletResponse response,
Element[] requestSoapParts,
byte[][] responseSoapParts,
Map<String,Object> context)
Implement to handle application specified SOAP header. |
void |
init(ServletConfig servletConfig)
Initializes servlet and XML/A handler. |
protected void |
initCallbacks(ServletConfig servletConfig)
Registers callbacks configured in web.xml. |
protected void |
initCharEncodingHandler(ServletConfig servletConfig)
Initialize character encoding |
protected CatalogLocator |
makeCatalogLocator(ServletConfig servletConfig)
Make catalog locator. |
protected DataSourcesConfig.DataSources |
makeDataSources(ServletConfig servletConfig)
Make DataSourcesConfig.DataSources instance. |
protected abstract void |
marshallSoapMessage(HttpServletResponse response,
byte[][] responseSoapParts)
Implement to privode application specified SOAP marshalling algorithm. |
protected DataSourcesConfig.DataSources |
parseDataSources(String dataSourcesConfigString)
|
protected DataSourcesConfig.DataSources |
parseDataSourcesUrl(URL dataSourcesConfigUrl)
|
protected String |
readDataSourcesContent(URL dataSourcesConfigUrl)
|
protected abstract void |
unmarshallSoapMessage(HttpServletRequest request,
Element[] requestSoapParts)
Implement to provide application specified SOAP unmarshalling algorithm. |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PARAM_DATASOURCES_CONFIG
public static final String PARAM_OPTIONAL_DATASOURCE_CONFIG
public static final String PARAM_CHAR_ENCODING
public static final String PARAM_CALLBACKS
public static final String DEFAULT_DATASOURCE_FILE
protected CatalogLocator catalogLocator
protected DataSourcesConfig.DataSources dataSources
protected XmlaHandler xmlaHandler
protected String charEncoding
Constructor Detail |
---|
public XmlaServlet()
Method Detail |
---|
public static boolean getBooleanInitParameter(ServletConfig servletConfig, String paramName)
public static boolean getParameter(HttpServletRequest req, String paramName)
public void init(ServletConfig servletConfig) throws ServletException
init
in interface Servlet
init
in class GenericServlet
ServletException
protected XmlaHandler getXmlaHandler()
protected final void addCallback(XmlaRequestCallback callback)
protected final List<XmlaRequestCallback> getCallbacks()
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
doPost
in class HttpServlet
ServletException
IOException
protected abstract void unmarshallSoapMessage(HttpServletRequest request, Element[] requestSoapParts) throws XmlaException
XmlaException
protected abstract void handleSoapHeader(HttpServletResponse response, Element[] requestSoapParts, byte[][] responseSoapParts, Map<String,Object> context) throws XmlaException
XmlaException
protected abstract void handleSoapBody(HttpServletResponse response, Element[] requestSoapParts, byte[][] responseSoapParts, Map<String,Object> context) throws XmlaException
XmlaException
protected abstract void marshallSoapMessage(HttpServletResponse response, byte[][] responseSoapParts) throws XmlaException
XmlaException
protected abstract void handleFault(HttpServletResponse response, byte[][] responseSoapParts, XmlaServlet.Phase phase, Throwable t)
protected CatalogLocator makeCatalogLocator(ServletConfig servletConfig)
protected DataSourcesConfig.DataSources makeDataSources(ServletConfig servletConfig)
If there is an initParameter called "DataSourcesConfig" get its value, replace any "${key}" content with "value" where "key/value" are System properties, and try to create a URL instance out of it. If that fails, then assume its a real filepath and if the file exists then create a URL from it (but only if the file exists). If there is no initParameter with that name, then attempt to find the file called "datasources.xml" under "WEB-INF/" and if it exists, use it.
protected void addToDataSources(DataSourcesConfig.DataSources dataSources)
protected DataSourcesConfig.DataSources parseDataSourcesUrl(URL dataSourcesConfigUrl)
protected String readDataSourcesContent(URL dataSourcesConfigUrl) throws IOException
IOException
protected DataSourcesConfig.DataSources parseDataSources(String dataSourcesConfigString)
protected void initCharEncodingHandler(ServletConfig servletConfig)
protected void initCallbacks(ServletConfig servletConfig)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |