Skip to content

Most visited

Recently visited

navigation
Added in API level 9

CommonDataSource

public interface CommonDataSource

javax.sql.CommonDataSource
Known Indirect Subclasses


Interface that defines the methods which are common between DataSource, XADataSource and ConnectionPoolDataSource.

Summary

Public methods

abstract PrintWriter getLogWriter()

Retrieves a log writer which is a character output stream to which all logging and tracing messages for this data source will be printed.

abstract int getLoginTimeout()

While attempting to connect to a database, this method get the maximum time in seconds that this data source can wait.

abstract void setLogWriter(PrintWriter out)

Set a log writer which is a character output stream to which all logging and tracing messages for this data source will be printed.

abstract void setLoginTimeout(int seconds)

While attempting to connect to a database, this method set the maximum time in seconds that this data source can wait.

Public methods

getLogWriter

Added in API level 1
PrintWriter getLogWriter ()

Retrieves a log writer which is a character output stream to which all logging and tracing messages for this data source will be printed.

Returns
PrintWriter The PrintWriter object for this DataSource.
Throws
SQLException An exception threw when a data base access error occurs.

getLoginTimeout

Added in API level 1
int getLoginTimeout ()

While attempting to connect to a database, this method get the maximum time in seconds that this data source can wait.

Returns
int An integer value to indicate the maximum time.
Throws
SQLException An exception threw when a data base access error occurs.

setLogWriter

Added in API level 1
void setLogWriter (PrintWriter out)

Set a log writer which is a character output stream to which all logging and tracing messages for this data source will be printed.

Parameters
out PrintWriter: The PrintWriter object for this DataSource.
Throws
SQLException

setLoginTimeout

Added in API level 1
void setLoginTimeout (int seconds)

While attempting to connect to a database, this method set the maximum time in seconds that this data source can wait.

Parameters
seconds int: An integer value to indicate the maximum time.
Throws
SQLException An exception threw when a data base access error occurs.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.