Package mondrian.xmla
Class XmlaHandler
java.lang.Object
mondrian.xmla.XmlaHandler
An
XmlaHandler
responds to XML for Analysis (XML/A) requests.- Since:
- 27 April, 2003
- Author:
- jhyde, Gang Chen
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Creates an olap4j connection for responding to XMLA requests.static interface
Extra support for XMLA server. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Name of property used by JDBC to hold locale.static final String
static final String
static final byte
static final byte
static final String
static final String
static final String
static final String
static final int
static final int
static final String
static final String
static final long
static final long
static final String
static final short
static final short
static final String
static final String
-
Constructor Summary
ConstructorDescriptionXmlaHandler
(XmlaHandler.ConnectionFactory connectionFactory) Creates anXmlaHandler
. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.olap4j.OlapConnection
getConnection
(String catalog, String schema, String role) Gets a Connection given a catalog (and implicitly the catalog's data source) and the name of a user role.protected org.olap4j.OlapConnection
getConnection
(String catalog, String schema, String role, Properties props) Gets a Connection given a catalog (and implicitly the catalog's data source) and the name of a user role.org.olap4j.OlapConnection
getConnection
(XmlaRequest request, Map<String, String> propMap) Returns a new OlapConnection opened with the credentials specified in the XMLA request or an existing connection if one can be found associated with the request session id.static XmlaHandler.XmlaExtra
getExtra
(org.olap4j.OlapConnection connection) static boolean
isValidXsdInt
(long l) void
process
(XmlaRequest request, XmlaResponse response) Processes a request.
-
Field Details
-
JDBC_LOCALE
Name of property used by JDBC to hold locale. It is not hard-wired into DriverManager like "user" and "password", but we do expect any olap4j driver that supports i18n to use this property name.- See Also:
-
XSD_BOOLEAN
- See Also:
-
XSD_STRING
- See Also:
-
XSD_UNSIGNED_INT
- See Also:
-
XSD_BYTE
- See Also:
-
XSD_BYTE_MAX_INCLUSIVE
public static final byte XSD_BYTE_MAX_INCLUSIVE- See Also:
-
XSD_BYTE_MIN_INCLUSIVE
public static final byte XSD_BYTE_MIN_INCLUSIVE- See Also:
-
XSD_SHORT
- See Also:
-
XSD_SHORT_MAX_INCLUSIVE
public static final short XSD_SHORT_MAX_INCLUSIVE- See Also:
-
XSD_SHORT_MIN_INCLUSIVE
public static final short XSD_SHORT_MIN_INCLUSIVE- See Also:
-
XSD_INT
- See Also:
-
XSD_INT_MAX_INCLUSIVE
public static final int XSD_INT_MAX_INCLUSIVE- See Also:
-
XSD_INT_MIN_INCLUSIVE
public static final int XSD_INT_MIN_INCLUSIVE- See Also:
-
XSD_LONG
- See Also:
-
XSD_LONG_MAX_INCLUSIVE
public static final long XSD_LONG_MAX_INCLUSIVE- See Also:
-
XSD_LONG_MIN_INCLUSIVE
public static final long XSD_LONG_MIN_INCLUSIVE- See Also:
-
XSD_DOUBLE
- See Also:
-
XSD_FLOAT
- See Also:
-
XSD_DECIMAL
- See Also:
-
XSD_INTEGER
- See Also:
-
-
Constructor Details
-
XmlaHandler
Creates anXmlaHandler
.The connection factory may be null, as long as you override
getConnection(String, String, String, Properties)
.- Parameters:
connectionFactory
- Connection factory
-
-
Method Details
-
getExtra
-
isValidXsdInt
public static boolean isValidXsdInt(long l) -
getConnection
public org.olap4j.OlapConnection getConnection(XmlaRequest request, Map<String, String> propMap) throws org.olap4j.OlapExceptionReturns a new OlapConnection opened with the credentials specified in the XMLA request or an existing connection if one can be found associated with the request session id.- Parameters:
request
- RequestpropMap
- Extra properties- Throws:
org.olap4j.OlapException
-
process
Processes a request.- Parameters:
request
- XML request, for example, "<SOAP-ENV:Envelope ...>".response
- Destination for response- Throws:
XmlaException
- on error
-
getConnection
protected org.olap4j.OlapConnection getConnection(String catalog, String schema, String role) throws XmlaException Gets a Connection given a catalog (and implicitly the catalog's data source) and the name of a user role.If you want to pass in a role object, and you are making the call within the same JVM (i.e. not RPC), register the role using
MondrianServer.getLockBox()
and pass in the moniker for the generated lock box entry. The server will retrieve the role from the moniker.- Parameters:
catalog
- Catalog nameschema
- Schema namerole
- User role name- Returns:
- Connection
- Throws:
XmlaException
- If error occurs
-
getConnection
protected org.olap4j.OlapConnection getConnection(String catalog, String schema, String role, Properties props) throws XmlaException Gets a Connection given a catalog (and implicitly the catalog's data source) and the name of a user role.If you want to pass in a role object, and you are making the call within the same JVM (i.e. not RPC), register the role using
MondrianServer.getLockBox()
and pass in the moniker for the generated lock box entry. The server will retrieve the role from the moniker.- Parameters:
catalog
- Catalog nameschema
- Schema namerole
- User role nameprops
- Properties to pass down to the native driver.- Returns:
- Connection
- Throws:
XmlaException
- If error occurs
-