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

public Class AFUNIXDatabaseSocketFactory

extends Object
implements SocketFactory
Class Inheritance
All Implemented Interfaces
com.mysql.jdbc.SocketFactory
Annotations
@SuppressWarnings:deprecation
Imports
java.io.File, .IOException, java.net.Socket, .SocketException, java.util.Properties, org.newsclub.net.unix.AFUNIXSocket, .AFUNIXSocketAddress, com.kohlschutter.annotations.compiletime.SuppressFBWarnings, com.mysql.jdbc.SocketFactory

References Deprecated

SocketFactory is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

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

Note

This SocketFactory currently implements the "old" Connector/J SocketFactory. This may change in the future. For the time being, see AFUNIXDatabaseSocketFactoryCJ to forcibly use the new "CJ"-style SocketFactory.

See Also
AFUNIXDatabaseSocketFactoryCJ

Field Summary

Modifier and TypeField and Description
private Socket

Constructor Summary

AccessConstructor and Description
public
AFUNIXDatabaseSocketFactory()

Creates a new instance.

Method Summary

Modifier and TypeMethod and Description
public Socket
afterHandshake()

Implements com.mysql.jdbc.SocketFactory.afterHandshake.

Called by the driver after issuing the MySQL protocol handshake and reading the results of the handshake.

public Socket
beforeHandshake()

Implements com.mysql.jdbc.SocketFactory.beforeHandshake.

Called by the driver before issuing the MySQL protocol handshake.

public Socket
connect(String
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.
host
,
int
the port number to connect to (if required).
portNumber
,
Properties
properties passed to the driver via the URL and/or properties instance.
props
)

Implements com.mysql.jdbc.SocketFactory.connect.

Creates a new socket using the given properties.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

socketback to summary
private Socket socket

Constructor Detail

AFUNIXDatabaseSocketFactoryback to summary
public AFUNIXDatabaseSocketFactory()

Creates a new instance.

Method Detail

afterHandshakeback to summary
public Socket afterHandshake() throws SocketException, IOException

Implements com.mysql.jdbc.SocketFactory.afterHandshake.

Doc from com.mysql.jdbc.SocketFactory.afterHandshake.

Called by the driver after issuing the MySQL protocol handshake and reading the results of the handshake.

Returns:Socket

the socket to use after the handshake

Annotations
@Override
@SuppressFBWarnings:EI_EXPOSE_REP
Exceptions
SocketException:
if a socket error occurs
IOException:
if an I/O error occurs
beforeHandshakeback to summary
public Socket beforeHandshake() throws SocketException, IOException

Implements com.mysql.jdbc.SocketFactory.beforeHandshake.

Doc from com.mysql.jdbc.SocketFactory.beforeHandshake.

Called by the driver before issuing the MySQL protocol handshake. Should return the socket instance that should be used during the handshake.

Returns:Socket

the socket to use before the handshake

Annotations
@Override
@SuppressFBWarnings:EI_EXPOSE_REP
Exceptions
SocketException:
if a socket error occurs
IOException:
if an I/O error occurs
connectback to summary
public Socket connect(String host, int portNumber, Properties props) throws SocketException, IOException

Implements com.mysql.jdbc.SocketFactory.connect.

Doc from com.mysql.jdbc.SocketFactory.connect.

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

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

the port number to connect to (if required).

props:Properties

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

Returns:Socket

a socket connected to the given host

Annotations
@Override
@SuppressFBWarnings:EI_EXPOSE_REP
Exceptions
SocketException:
if a socket error occurs
IOException:
if an I/O error occurs