to top
Android APIs
Since: API Level 9
public interface

CommonDataSource

javax.sql.CommonDataSource
Known Indirect Subclasses

Class Overview

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

public abstract PrintWriter getLogWriter ()

Since: API Level 1

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
  • The PrintWriter object for this DataSource.
Throws
SQLException An exception threw when a data base access error occurs.

public abstract int getLoginTimeout ()

Since: API Level 1

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

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

public abstract void setLogWriter (PrintWriter out)

Since: API Level 1

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 The PrintWriter object for this DataSource.
Throws
SQLException

public abstract void setLoginTimeout (int seconds)

Since: API Level 1

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

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