class MondrianServerImpl extends MondrianServer implements CatalogFinder, XmlaHandler.ConnectionFactory
MondrianServer
.MondrianServer.MondrianVersion
Constructor and Description |
---|
MondrianServerImpl(MondrianServerRegistry registry,
Repository repository,
CatalogLocator catalogLocator)
Creates a MondrianServerImpl.
|
Modifier and Type | Method and Description |
---|---|
void |
addConnection(RolapConnection connection)
Called just after a connection has been created.
|
void |
addStatement(Statement statement)
Called just after a statement has been created.
|
protected void |
finalize() |
AggregationManager |
getAggregationManager() |
CatalogLocator |
getCatalogLocator() |
List<String> |
getCatalogNames(RolapConnection connection)
Returns a list of catalogs.
|
RolapConnection |
getConnection(int connectionId)
Retrieves a connection.
|
OlapConnection |
getConnection(String databaseName,
String catalogName,
String roleName)
Gets a Connection given a catalog (and implicitly the catalog's data
source) and the name of a user role.
|
OlapConnection |
getConnection(String databaseName,
String catalogName,
String roleName,
Properties props)
Extended version of
MondrianServer.getConnection(String, String, String)
taking a list of properties to pass down to the native connection. |
List<Map<String,Object>> |
getDatabases(RolapConnection connection)
Returns a list of the databases in this server.
|
int |
getId()
Returns an integer uniquely identifying this server within its JVM.
|
List<String> |
getKeywords()
Returns a list of MDX keywords.
|
LockBox |
getLockBox()
Returns the lock box that can be used to pass objects via their string
key.
|
Monitor |
getMonitor() |
Map<String,Object> |
getPreConfiguredDiscoverDatasourcesResponse()
Returns a map of property name-value pairs with which to populate
the response to the DISCOVER_DATASOURCES request.
|
RolapResultShepherd |
getResultShepherd() |
Map<String,RolapSchema> |
getRolapSchemas(RolapConnection connection,
String catalogName)
Returns a list of (schema name, schema) pairs in a catalog of a
particular name.
|
void |
removeConnection(RolapConnection connection)
Called when a connection is closed.
|
void |
removeStatement(Statement statement)
Called when a statement is closed.
|
void |
shutdown()
Called when the server must terminate all background tasks
and cleanup all potential memory leaks.
|
createWithRepository, dispose, forConnection, forId, getVersion
MondrianServerImpl(MondrianServerRegistry registry, Repository repository, CatalogLocator catalogLocator)
registry
- Registry of all servers in this JVMrepository
- Repository of catalogs and schemascatalogLocator
- Catalog locatorpublic int getId()
MondrianServer
getId
in class MondrianServer
public RolapResultShepherd getResultShepherd()
getResultShepherd
in class MondrianServer
public List<String> getKeywords()
MondrianServer
getKeywords
in class MondrianServer
public LockBox getLockBox()
MondrianServer
getLockBox
in class MondrianServer
public AggregationManager getAggregationManager()
getAggregationManager
in class MondrianServer
public OlapConnection getConnection(String databaseName, String catalogName, String roleName) throws SQLException
MondrianServer
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.
getConnection
in class MondrianServer
SQLException
- If error occursdatabaseName
- Catalog namecatalogName
- Schema nameroleName
- User role namepublic OlapConnection getConnection(String databaseName, String catalogName, String roleName, Properties props) throws SQLException
MondrianServer
MondrianServer.getConnection(String, String, String)
taking a list of properties to pass down to the native connection.
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.
getConnection
in interface XmlaHandler.ConnectionFactory
getConnection
in class MondrianServer
SQLException
- If error occursdatabaseName
- Catalog namecatalogName
- Schema nameroleName
- User role nameprops
- Properties to pass down to the native driver.public List<String> getCatalogNames(RolapConnection connection)
CatalogFinder
The catalog names occur in the natural order of the repository.
getCatalogNames
in interface CatalogFinder
connection
- Connection to mondrian
we want the catalog children.public List<Map<String,Object>> getDatabases(RolapConnection connection)
MondrianServer
getDatabases
in class MondrianServer
connection
- Connectionpublic CatalogLocator getCatalogLocator()
getCatalogLocator
in class MondrianServer
public void shutdown()
MondrianServer
shutdown
in class MondrianServer
public void addConnection(RolapConnection connection)
MondrianServer
addConnection
in class MondrianServer
connection
- Connectionpublic void removeConnection(RolapConnection connection)
MondrianServer
removeConnection
in class MondrianServer
connection
- Connectionpublic RolapConnection getConnection(int connectionId)
MondrianServer
getConnection
in class MondrianServer
connectionId
- Connection id, per
RolapConnection.getId()
public void addStatement(Statement statement)
MondrianServer
addStatement
in class MondrianServer
statement
- Statementpublic void removeStatement(Statement statement)
MondrianServer
removeStatement
in class MondrianServer
statement
- Statementpublic Monitor getMonitor()
getMonitor
in class MondrianServer
public Map<String,RolapSchema> getRolapSchemas(RolapConnection connection, String catalogName)
CatalogFinder
The name of the schema may not be the same as the value returned by
RolapSchema.getName()
. In fact, a given schema
may occur multiple times in the same catalog with different names.
The schemas occur in the natural order of the repository.
getRolapSchemas
in interface CatalogFinder
connection
- Connection to mondriancatalogName
- Name of catalogpublic Map<String,Object> getPreConfiguredDiscoverDatasourcesResponse()
XmlaHandler.ConnectionFactory
Properties correspond to the columns of that request: ""DataSourceName", et cetera.
Returns null if there is no pre-configured response; in which case, the driver will have to connect to get a response.
getPreConfiguredDiscoverDatasourcesResponse
in interface XmlaHandler.ConnectionFactory