程序包 com.mysql.jdbc
接口 SocketFactory
-
@Deprecated public interface SocketFactory
已过时。UseSocketFactoryinstead.Interface to allow pluggable socket creation in the driver
-
-
方法概要
所有方法 实例方法 抽象方法 已过时的方法 修饰符和类型 方法 说明 SocketafterHandshake()已过时。Called by the driver after issuing the MySQL protocol handshake and reading the results of the handshake.SocketbeforeHandshake()已过时。Called by the driver before issuing the MySQL protocol handshake.Socketconnect(String host, int portNumber, Properties props)已过时。Creates a new socket using the given properties.
-
-
-
方法详细资料
-
afterHandshake
Socket afterHandshake() throws SocketException, IOException
已过时。Called by the driver after issuing the MySQL protocol handshake and reading the results of the handshake.- 返回:
- the socket to use after the handshake
- 抛出:
SocketException- if a socket error occursIOException- if an I/O error occurs
-
beforeHandshake
Socket beforeHandshake() throws SocketException, IOException
已过时。Called by the driver before issuing the MySQL protocol handshake. Should return the socket instance that should be used during the handshake.- 返回:
- the socket to use before the handshake
- 抛出:
SocketException- if a socket error occursIOException- if an I/O error occurs
-
connect
Socket connect(String host, int portNumber, Properties props) throws SocketException, IOException
已过时。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 iscom.mysql.jdbc.StandardSocketFactoryImplementing classes are responsible for handling synchronization of this method (if needed).- 参数:
host- the hostname passed in the JDBC URL. It will be a single hostname, as the driver parses multi-hosts (for failover) and calls this method for each host connection attempt.portNumber- the port number to connect to (if required).props- properties passed to the driver via the URL and/or properties instance.- 返回:
- a socket connected to the given host
- 抛出:
SocketException- if a socket error occursIOException- if an I/O error occurs
-
-