|
Oracle™ Business Intelligence Beans Java API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.dss.connection.client.Connection
The main class of the connection bean. The connection bean manages connections to data. Each type of connection must have a separate Connection
instance. For example, if you connect to the repository and to an RDBMS where OLAP services metadata is stored, then you need two Connection
instances, one Connection
for the repository and one for the RDBMS. A BISession
can have multiple connections.
Constructor Summary | |
Connection() Constructor. |
Method Summary | |
void |
addListener(ConnectionListener listener) Adds a ConnectionListener to this connection. |
int |
connect() Connects this connection to the server. |
int |
disconnect() Disconnects this connection from the server. |
java.lang.String |
executeCommand(java.lang.String command) Executes the OLAP DML command and returns the result of the command. |
int |
free() Frees all resources that were allocated by this connection. |
java.lang.String |
getBeanName() Retrieves the name of this connection. |
int |
getConnectionStatus() Retrieves the status of this connection. |
java.lang.String |
getDriverImpl(java.lang.String driverType) Retrieve the driver associated with the specified drivertype from the connection bean. |
java.lang.String |
getDriverType() Retrieves the type of driver that this connection uses. |
java.lang.String |
getHostName() Retrieves the host name for this connection. |
java.lang.String |
getJdbcDriverType() Retrieves the type of JDBC driver used to connect to the OLAP service. |
java.lang.String |
getJdbcUrl() Retrieves the JDBC URL for this connection. |
java.util.Locale |
getLocale() Retrieves the locale that this MetadataManager uses. |
java.lang.String |
getOLAPServiceName() Retrieves the name of the OLAP service. |
java.lang.String |
getPassword() Retrieves the password for this connection. |
int |
getPortNumber() Retrieves the port number for this connection. |
java.lang.String |
getServerType() Retrieves the type of service that this connection is for. |
java.lang.String |
getService() Retrieves the service name for this connection. |
BISession |
getSession() Retrieves the session to which this Connection belongs. |
java.lang.String |
getSID() Retrieves the Oracle SID for this connection. |
java.lang.String |
getUsername() Retrieves the user name for this connection. |
PropertyBag |
getVersionInfo() |
java.lang.String |
getXMLAsString() Retrieves the XML representation of this connection. |
boolean |
isAlive() Indicates whether the CORBA stub can still talk to Oracle OLAP through the ORB and has not timed out. |
boolean |
isConnected() Indicates whether this connection instance is connected to the server. |
boolean |
isConnectionFailed() Indicates whether a connection is successful or has failed. |
java.util.Hashtable |
listDriverImpl() List the drivers associated with the connection bean |
int |
reconnect(PropertyBag reconnectParams) Reconnects this Connection . |
void |
removeDriverImpl(java.lang.String driverType) De-register the driver from the connection bean. |
void |
removeListener(ConnectionListener listener) Removes a ConnectionListener from this connection. |
void |
setBeanName(java.lang.String name) Specifies the name of this connection. |
void |
setConnectionStatus(int status) Specifies the current status of this connection. |
void |
setDriverImpl(java.lang.String driverType, java.lang.String driverClassName) Set the driverType and register the driver implementation for the specified the driverType. |
void |
setDriverType(java.lang.String driverType) Specifies the type of driver that this connection uses. |
void |
setHostName(java.lang.String hostname) Specifies the host name for this connection. |
void |
setJdbcDriverType(java.lang.String driverType) Specifies the type of JDBC driver used to connect to the OLAP service. |
void |
setJdbcUrl(java.lang.String jdbcUrl) Specifies the JDBC URL for this connection. |
void |
setLocale(java.util.Locale locale) Specifies the locale that this Connection uses. |
void |
setOLAPServiceName(java.lang.String olapService) Specifies the name of the OLAP service. |
void |
setPassword(java.lang.String password) Specifies the password for this connection. |
void |
setPortNumber(int port) Specifies the port number for this connection. |
void |
setProperty(java.lang.String name, java.lang.Object object) Sets a property on this connection |
void |
setServerType(java.lang.String serverType) Specifies the type of service that this connection is for. |
void |
setService(java.lang.String service) Specifies the service name for this connection. |
void |
setSession(BISession session) Specifies the session to which this Connection belongs. |
void |
setSID(java.lang.String sid) Specifies the Oracle SID for this connection. |
void |
setUsername(java.lang.String username) Specifies the user name for this connection. |
boolean |
setXMLAsString(java.lang.String xml) Specifies the XML representation of this connection. |
boolean |
verifyVersion() This method validates the internal connection version. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.dss.util.persistence.Persistable |
getPersistableAttributes, getPersistableComponents, initialize, setPersistableAttributes, setPersistableComponents |
Methods inherited from interface oracle.dss.util.ErrorHandlerCallback |
addErrorHandler, removeErrorHandler |
Constructor Detail |
public Connection()
Method Detail |
public void setSession(BISession session)
Connection
belongs.session
- The BISession
to which this Connection
object belongs.public BISession getSession()
Connection
belongs.BISession
to which this Connection
object belongs.public boolean isConnected()
true
if this connection is connected, false
if it is not connected.public boolean isConnectionFailed()
true
if this connection failed while an attempt was made to connect, false
if the connection attempt succeeded and the connection is in a connected state.public void addListener(ConnectionListener listener)
ConnectionListener
to this connection. A ConnectionListener
listens for connection events.listener
- The listener to add.public void removeListener(ConnectionListener listener)
ConnectionListener
from this connection.listener
- The listener to remove.public int connect() throws ConnectionException
ConnectionException
- If the connection process failsCB.CONNECTED
, CB.NOT_CONNECTED
, MDU.FAILURE
, MDU.NO_REMOTE
public int disconnect() throws ConnectionException
ConnectionException
- If the disconnection process failsCB.CONNECTED
, CB.NOT_CONNECTED
, MDU.FAILURE
, MDU.NO_REMOTE
public java.lang.String executeCommand(java.lang.String command) throws ConnectionException
command
- The OLAP DML command to execute.ConnectionException
- If the execution failed.public void setProperty(java.lang.String name, java.lang.Object object)
name
- The name of the propertyobject
- The value of the propertypublic java.lang.String getBeanName()
public void setBeanName(java.lang.String name)
name
- The name of this connection.public java.lang.String getServerType()
public void setServerType(java.lang.String serverType)
serverType
- "OlapServer" for a ROLAP (Relational OLAP) connection.public java.lang.String getDriverType()
MDU.MDM
for a MetadataManager connectionMDU.PERSISTENCE
for a connection to the persistence serviceMDU.MDM
, MDU.PERSISTENCE
public void setDriverType(java.lang.String driverType)
driverType
- A constant that indicates the type of driver for this connection. Valid constants are listed in the See Also section.MDU.MDM
, MDU.PERSISTENCE
public int getConnectionStatus()
CB.CONNECTED
, CB.NOT_CONNECTED
, CB.CONNECTING
public void setConnectionStatus(int status)
status
- A constant that represents the status of this connection. Valid values are listed in the See Also section.CB.CONNECTED
, CB.NOT_CONNECTED
, CB.CONNECTING
public java.lang.String getUsername()
public void setUsername(java.lang.String username)
If you use single sign-on, you do not need to call this method. The connection retrieves the user name from the DAD.
username
- The user name for this connection.public java.lang.String getPassword()
public void setPassword(java.lang.String password)
If you use single sign-on, you do not need to call this method. The connection retrieves the password from the DAD.
password
- The password for this connection.public java.lang.String getService()
public void setService(java.lang.String service)
service
- The service name for this connection.public java.lang.String getHostName()
public void setHostName(java.lang.String hostname)
hostname
- The host name for this connection.public int getPortNumber()
public void setPortNumber(int port)
port
- The port number for this connection.public java.lang.String getSID()
public void setSID(java.lang.String sid)
sid
- The Oracle SID for this connection.public java.lang.String getJdbcUrl()
public void setJdbcUrl(java.lang.String jdbcUrl)
jdbc:oracle:[Protocol]:@[Host]:[Jdbc Port]:[Database Sid]
jdbcUrl
- The JDBC URL for this connection.public java.lang.String getOLAPServiceName()
public void setOLAPServiceName(java.lang.String olapService)
olapService
- The name of the OLAP service.public java.lang.String getJdbcDriverType()
public void setJdbcDriverType(java.lang.String driverType)
driverType
- The type of JDBC driver used to connect to the OLAP service. Valid values are "thin" and "oci8".public int free() throws ConnectionException
CB.SUCCESS
.ConnectionException
- If a problem occurs in releasing resources.MDU.SUCCESS
public java.lang.String getXMLAsString() throws BIPersistenceException
getXMLAsString
in interface StringXMLizable
BIPersistenceException
- If a problem occurs in getting the XML.public boolean setXMLAsString(java.lang.String xml) throws BIPersistenceException
setXMLAsString
in interface StringXMLizable
name
- The XML representation of this connection.true
the XML was successfully set, false
if not.BIPersistenceException
- If a problem occurs in setting the XML.public void setLocale(java.util.Locale locale)
Connection
uses.locale
- The Locale
for this Connection
.public java.util.Locale getLocale()
MetadataManager
uses.MetadataManager
uses.public boolean isAlive()
true
if the CORBA stub is viable. false
if the CORBA stub is dead.public int reconnect(PropertyBag reconnectParams) throws ConnectionException
Connection
.reconnectParams
- Properties for reconnecting. Valid constants for an OLAP connecton are listed in the See Also section.ConnectionException
- If there is a problem during the reconnection.CB.USERNAME
, CB.PASSWORD
, CB.HOSTNAME
, CB.PORT
, CB.SID
, CB.SERVER_TYPE
, MDU.DRIVER_TYPE
public boolean verifyVersion()
true
if the version is valid, false
if it is not.public PropertyBag getVersionInfo()
public void setDriverImpl(java.lang.String driverType, java.lang.String driverClassName)
driverType
- String associated with the ConnectionDriver.driverImpl
- String representing the fully qualified class name of the ConnectionDriver implementation. The connection bean will instantiate the class at connect time.public java.util.Hashtable listDriverImpl()
public java.lang.String getDriverImpl(java.lang.String driverType)
driverType
- String associated with the ConnectionDriver.public void removeDriverImpl(java.lang.String driverType)
driverType
- String associated with the ConnectionDriver that should be removed.
|
Oracle™ Business Intelligence Beans Java API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |