| com.mysql.jdbc.SocketFactory
SocketFactory | public interface SocketFactory (Code) | | Interface to allow pluggable socket creation in the driver
author: Mark Matthews |
beforeHandshake | Socket beforeHandshake() throws SocketException, IOException(Code) | | Called by the driver before issuing the MySQL protocol handshake. Should
return the socket instance that should be used during the handshake.
throws: SocketException - if a socket error occurs throws: IOException - if an I/O error occurs the socket to use before the handshake |
connect | Socket connect(String host, int portNumber, Properties props) throws SocketException, IOException(Code) | | Creates a new socket using the given properties. Properties are parsed by
the driver from the URL. All properties other than sensitive ones (user
and password) are passed to this method. The driver will instantiate the
socket factory with the class name given in the property
"socketFactory", where the standard is
com.mysql.jdbc.StandardSocketFactory Implementing classes
are responsible for handling synchronization of this method (if needed).
Parameters: host - the hostname passed in the JDBC URL. It will be a singlehostname, as the driver parses multi-hosts (for failover) andcalls this method for each host connection attempt. Parameters: portNumber - the port number to connect to (if required). Parameters: props - properties passed to the driver via the URL and/or propertiesinstance. a socket connected to the given host throws: SocketException - if a socket error occurs throws: IOException - if an I/O error occurs |
|
|