类 SocksProxySocketFactory
- java.lang.Object
-
- com.mysql.cj.protocol.StandardSocketFactory
-
- com.mysql.cj.protocol.SocksProxySocketFactory
-
- 所有已实现的接口:
SocketFactory,SocketMetadata
public class SocksProxySocketFactory extends StandardSocketFactory
A socket factory used to create sockets connecting through a SOCKS proxy. The socket still supports all the same TCP features as the "standard" socket.
-
-
字段概要
-
从类继承的字段 com.mysql.cj.protocol.StandardSocketFactory
host, loginTimeoutCheckTimestamp, loginTimeoutCountdown, port, rawSocket, socketTimeoutBackup, sslSocket
-
-
构造器概要
构造器 构造器 说明 SocksProxySocketFactory()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 <T extends Closeable>
Tconnect(String hostname, int portNumber, PropertySet pset, int loginTimeout)Creates a new socket or channel using the given properties.protected SocketcreateSocket(PropertySet props)Create the raw socket.-
从类继承的方法 com.mysql.cj.protocol.StandardSocketFactory
afterHandshake, beforeHandshake, configureSocket, getRealTimeout, performTlsHandshake, performTlsHandshake, resetLoginTimeCountdown
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 com.mysql.cj.protocol.SocketMetadata
isLocallyConnected, isLocallyConnected
-
-
-
-
方法详细资料
-
createSocket
protected Socket createSocket(PropertySet props)
从类复制的说明:StandardSocketFactoryCreate the raw socket.- 覆盖:
createSocket在类中StandardSocketFactory- 参数:
props- properties available to affect behaviour during socket creation.- 返回:
- socket
-
connect
public <T extends Closeable> T connect(String hostname, int portNumber, PropertySet pset, int loginTimeout) throws IOException
从接口复制的说明:SocketFactoryCreates a new socket or channel 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.cj.protocol.StandardSocketFactoryImplementing classes are responsible for handling synchronization of this method (if needed).- 指定者:
connect在接口中SocketFactory- 覆盖:
connect在类中StandardSocketFactory- 类型参数:
T- result type- 参数:
hostname- the hostname passed in the 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).pset- properties passed to the driver via the URL and/or properties instance.loginTimeout- login timeout in milliseconds- 返回:
- a socket connected to the given host
- 抛出:
IOException- if an I/O error occurs
-
-