Top Description Fields Constructors Methods
com.mysql.cj.protocol

public Class SocksProxySocketFactory

extends StandardSocketFactory
Class Inheritance
Imports
java.io.Closeable, .IOException, java.net.InetAddress, .InetSocketAddress, .Proxy, .Socket, .SocketException, com.mysql.cj.conf.PropertyKey, .PropertySet

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.

Field Summary

Inherited from com.mysql.cj.protocol.StandardSocketFactory:
hostloginTimeoutCheckTimestamploginTimeoutCountdownportrawSocketsocketTimeoutBackupsslSocket

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public <T extends Closeable> T
connect(String
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.
hostname
,
int
the port number to connect to (if required).
portNumber
,
PropertySet
properties passed to the driver via the URL and/or properties instance.
pset
,
int
login timeout in milliseconds
loginTimeout
)

Overrides com.mysql.cj.protocol.StandardSocketFactory.connect.

Implements com.mysql.cj.protocol.SocketFactory.connect.

Creates a new socket or channel using the given properties.

protected Socket
createSocket(PropertySet
properties available to affect behaviour during socket creation.
props
)

Overrides com.mysql.cj.protocol.StandardSocketFactory.createSocket.

Create the raw socket.

Inherited from com.mysql.cj.protocol.StandardSocketFactory:
afterHandshakebeforeHandshakeconfigureSocketgetRealTimeoutperformTlsHandshakeperformTlsHandshakeresetLoginTimeCountdown

Constructor Detail

SocksProxySocketFactoryback to summary
public SocksProxySocketFactory()

Method Detail

connectback to summary
public <T extends Closeable> T connect(String hostname, int portNumber, PropertySet pset, int loginTimeout) throws IOException

Overrides com.mysql.cj.protocol.StandardSocketFactory.connect.

Implements com.mysql.cj.protocol.SocketFactory.connect.

Doc from com.mysql.cj.protocol.SocketFactory.connect.

Creates 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 is com.mysql.cj.protocol.StandardSocketFactory Implementing classes are responsible for handling synchronization of this method (if needed).

Parameters
<T>
result type
hostname:String

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:int

the port number to connect to (if required).

pset:PropertySet

properties passed to the driver via the URL and/or properties instance.

loginTimeout:int

login timeout in milliseconds

Returns:T

a socket connected to the given host

Annotations
@Override
@SuppressWarnings:unchecked
Exceptions
IOException:
if an I/O error occurs
createSocketback to summary
protected Socket createSocket(PropertySet props)

Overrides com.mysql.cj.protocol.StandardSocketFactory.createSocket.

Doc from com.mysql.cj.protocol.StandardSocketFactory.createSocket.

Create the raw socket.

Parameters
props:PropertySet

properties available to affect behaviour during socket creation.

Returns:Socket

socket

Annotations
@Override