Interface DriverAction


public interfaceDriverAction
An interface that must be implemented when aDriver wants to be notified byDriverManager.

ADriverAction implementation is not intended to be used directly by applications. A JDBC Driver may choose to create itsDriverAction implementation in a private class to avoid it being called directly.

The JDBC driver's static initialization block must callDriverManager.registerDriver(java.sql.Driver, java.sql.DriverAction) in order to informDriverManager whichDriverAction implementation to call when the JDBC driver is de-registered.

Since:
1.8
  • Method Details

    • deregister

      void deregister()
      Method called byDriverManager.deregisterDriver(Driver) to notify the JDBC driver that it was de-registered.

      Thederegister method is intended only to be used by JDBC Drivers and not by applications. JDBC drivers are recommended to not implementDriverAction in a public class. If there are active connections to the database at the time that thederegister method is called, it is implementation specific as to whether the connections are closed or allowed to continue. Once this method is called, it is implementation specific as to whether the driver may limit the ability to create new connections to the database, invoke otherDriver methods or throw aSQLException. Consult your JDBC driver's documentation for additional information on its behavior.

      Since:
      1.8
      See Also: