|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.olap4j.driver.xmla.XmlaOlap4jDriver
public class XmlaOlap4jDriver
Olap4j driver for generic XML for Analysis (XMLA) providers.
Since olap4j is a superset of JDBC, you register this driver as you would any JDBC driver:
Class.forName("org.olap4j.driver.xmla.XmlaOlap4jDriver");
Then create a connection using a URL with the prefix "jdbc:xmla:".
For example,
import java.sql.Connection;
import java.sql.DriverManager;
import org.olap4j.OlapConnection;
Connection connection =
DriverManager.getConnection(
"jdbc:xmla:");
OlapConnection olapConnection =
connection.unwrap(OlapConnection.class);
Note how we use the Wrapper.unwrap(Class)
method to down-cast
the JDBC connection object to the extension OlapConnection
object. This method is only available in JDBC 4.0 (JDK 1.6 onwards).
Unless otherwise stated, properties are optional. If a property occurs multiple times in the connect string, the first occurrence is used.
Property | Description |
---|---|
Server | URL of HTTP server. Required. |
Catalog | Catalog name to use. By default, the first one returned by the XMLA server will be used. |
Provider | Name of the XMLA provider. |
DataSource | Name of the XMLA datasource. When using a Mondrian backed XMLA server, be sure to include the full datasource name between quotes. |
Cache | Class name of the SOAP cache to use.
Must implement interface
By default, no SOAP query cache will be used. |
Cache.* | Properties to transfer to the selected cache
implementation. See
XmlaOlap4jCache
or your selected implementation for properties
details. |
TestProxyCookie | String that uniquely identifies a proxy
object in PROXY_MAP via which to
send XMLA requests for testing
purposes. |
Nested Class Summary | |
---|---|
static class |
XmlaOlap4jDriver.Property
Properties supported by this driver. |
static interface |
XmlaOlap4jDriver.Proxy
Deprecated. |
Field Summary | |
---|---|
static java.util.Map<java.lang.String,XmlaOlap4jProxy> |
PROXY_MAP
For testing. |
Method Summary | |
---|---|
boolean |
acceptsURL(java.lang.String url)
|
java.sql.Connection |
connect(java.lang.String url,
java.util.Properties info)
|
static java.util.concurrent.Future<byte[]> |
getFuture(XmlaOlap4jProxy proxy,
java.net.URL url,
java.lang.String request)
Returns a future object representing an asynchronous submission of an XMLA request to a URL. |
int |
getMajorVersion()
|
int |
getMinorVersion()
|
java.sql.DriverPropertyInfo[] |
getPropertyInfo(java.lang.String url,
java.util.Properties info)
|
java.lang.String |
getVersion()
Returns the driver version. |
boolean |
jdbcCompliant()
|
static java.lang.String |
nextCookie()
Generates and returns a unique string. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.util.Map<java.lang.String,XmlaOlap4jProxy> PROXY_MAP
Method Detail |
---|
public java.sql.Connection connect(java.lang.String url, java.util.Properties info) throws java.sql.SQLException
connect
in interface java.sql.Driver
java.sql.SQLException
public boolean acceptsURL(java.lang.String url) throws java.sql.SQLException
acceptsURL
in interface java.sql.Driver
java.sql.SQLException
public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url, java.util.Properties info) throws java.sql.SQLException
getPropertyInfo
in interface java.sql.Driver
java.sql.SQLException
public java.lang.String getVersion()
public int getMajorVersion()
getMajorVersion
in interface java.sql.Driver
public int getMinorVersion()
getMinorVersion
in interface java.sql.Driver
public boolean jdbcCompliant()
jdbcCompliant
in interface java.sql.Driver
public static java.util.concurrent.Future<byte[]> getFuture(XmlaOlap4jProxy proxy, java.net.URL url, java.lang.String request)
proxy
- Proxy via which to send the requesturl
- URL of XMLA serverrequest
- Request
public static java.lang.String nextCookie()
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |