API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.sql. DriverManager View Source
Author(s)
Since
Version
Serial
Hierarchy
 Object
      DriverManager
Implements
Subclasses
Description
public class DriverManager
  The basic service for managing a set of JDBC drivers.
NOTE: The DataSource interface, new in the JDBC 2.0 API, provides another way to connect to a data source.
See also:    Driver Connection
Constructors
private DriverManager ()
Methods
Hide/Show inherited methods
publicstaticsynchronized void deregisterDriver (Driver driver) throws SQLException
  Drops a driver from the DriverManager's list.
publicstatic Connection getConnection (String url) throws SQLException
  Attempts to establish a connection to the given database URL.
publicstatic Connection getConnection (String url, Properties info) throws SQLException
  Attempts to establish a connection to the given database URL.
publicstatic Connection getConnection (String url, String user, String password) throws SQLException
  Attempts to establish a connection to the given database URL.
publicstatic Driver getDriver (String url) throws SQLException
  Attempts to locate a driver that understands the given URL.
publicstatic Enumeration<Driver> getDrivers ()
  Retrieves an Enumeration with all of the currently loaded JDBC drivers to which the current caller has access.
publicstatic int getLoginTimeout ()
  Gets the maximum time in seconds that a driver can wait when attempting to log in to a database.
publicstatic PrintStream getLogStream ()
  Retrieves the logging/tracing PrintStream that is used by the DriverManager and all drivers.
publicstatic PrintWriter getLogWriter ()
  Retrieves the log writer.
pack-privatestatic void initialize ()
publicstatic void println (String message)
  Prints a message to the current JDBC log stream.
publicstaticsynchronized void registerDriver (Driver driver) throws SQLException
  Registers the given driver with the DriverManager.
publicstatic void setLoginTimeout (int seconds)
  Sets the maximum time in seconds that a driver will wait while attempting to connect to a database.
publicstatic void setLogStream (PrintStream out)
  Sets the logging/tracing PrintStream that is used by the DriverManager and all drivers.
publicstatic void setLogWriter (PrintWriter out)
  Sets the logging/tracing PrintWriter object that is used by the DriverManager and all drivers.
Fields
Hide/Show inherited fields
pack-privatefinalstatic SQLPermission SET_LOG_PERMISSION
  The SQLPermission constant that allows the setting of the logging stream.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar