Top Description Fields Constructors Methods
org.newsclub.net.mysql

public Class AFUNIXDatabaseSocketFactoryCJ

extends Object
implements SocketFactory
Class Inheritance
All Implemented Interfaces
com.mysql.cj.protocol.SocketFactory, com.mysql.cj.protocol.SocketMetadata
Imports
java.io.File, .IOException, java.net.Socket, org.newsclub.net.unix.AFUNIXSocket, .AFUNIXSocketAddress, com.kohlschutter.annotations.compiletime.SuppressFBWarnings, com.mysql.cj.conf.PropertyKey, .PropertySet, .RuntimeProperty, com.mysql.cj.protocol.ExportControlled, .ServerSession, .SocketConnection, .SocketFactory

Connect to mysql databases (and compatibles) using UNIX domain sockets.

Field Summary

Modifier and TypeField and Description
private AFUNIXSocket

Constructor Summary

AccessConstructor and Description
public
AFUNIXDatabaseSocketFactoryCJ()

Creates a new instance.

Method Summary

Modifier and TypeMethod and Description
public Socket
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.
props
,
int
login timeout in milliseconds
loginTimeout
)

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

Creates a new socket or channel using the given properties.

public Socket
performTlsHandshake(SocketConnection
current SocketConnection
socketConnection
,
ServerSession
current ServerSession
serverSession
)

Implements com.mysql.cj.protocol.SocketFactory.performTlsHandshake.

If required, called by the driver during MySQL protocol handshake to transform original socket to SSL socket and perform TLS handshake.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

rawSocketback to summary
private AFUNIXSocket rawSocket

Constructor Detail

AFUNIXDatabaseSocketFactoryCJback to summary
public AFUNIXDatabaseSocketFactoryCJ()

Creates a new instance.

Method Detail

connectback to summary
public Socket connect(String hostname, int portNumber, PropertySet props, int loginTimeout) throws IOException

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
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).

props:PropertySet

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

loginTimeout:int

login timeout in milliseconds

Returns:Socket

a socket connected to the given host

Annotations
@SuppressWarnings:unchecked
@SuppressFBWarnings:EI_EXPOSE_REP
@Override
Exceptions
IOException:
if an I/O error occurs
performTlsHandshakeback to summary
public Socket performTlsHandshake(SocketConnection socketConnection, ServerSession serverSession) throws IOException

Implements com.mysql.cj.protocol.SocketFactory.performTlsHandshake.

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

If required, called by the driver during MySQL protocol handshake to transform original socket to SSL socket and perform TLS handshake.

Parameters
socketConnection:SocketConnection

current SocketConnection

serverSession:ServerSession

current ServerSession

Returns:Socket

SSL socket

Annotations
@SuppressWarnings:unchecked
@SuppressFBWarnings:EI_EXPOSE_REP
@Override
Exceptions
IOException:
if an I/O error occurs