DriverAction (Java SE 13 & JDK 13 )
public interface DriverAction
An interface that must be implemented when a Driver wants to be
notified by DriverManager.
A DriverAction implementation is not intended to be used
directly by applications. A JDBC Driver may choose
to create its DriverAction implementation in a private class
to avoid it being called directly.
The JDBC driver's static initialization block must call
DriverManager.registerDriver(java.sql.Driver, java.sql.DriverAction) in order
to inform DriverManager which DriverAction implementation to
call when the JDBC driver is de-registered.
- Since:
- 1.8
-
Method Details
-
deregister
void deregister()
Method called by DriverManager.deregisterDriver(Driver) to notify the JDBC driver that it was de-registered.
The
deregistermethod is intended only to be used by JDBC Drivers and not by applications. JDBC drivers are recommended to not implementDriverActionin a public class. If there are active connections to the database at the time that thederegistermethod 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 otherDrivermethods or throw aSQLException. Consult your JDBC driver's documentation for additional information on its behavior.
-
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2019, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.