Class NamedPipeSocketFactory
java.lang.Object
com.mysql.jdbc.NamedPipeSocketFactory
- All Implemented Interfaces:
SocketFactory, SocketMetadata
A socket factory for named pipes (on Windows)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classA socket that encapsulates named pipes on Windows(package private) classEnables OutputStream-type functionality for a RandomAccessFile(package private) classEnables OutputStream-type functionality for a RandomAccessFileNested classes/interfaces inherited from interface SocketMetadata
SocketMetadata.Helper -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCalled by the driver after issuing the MySQL protocol handshake and reading the results of the handshake.Called by the driver before issuing the MySQL protocol handshake.connect(String host, int portNumber, Properties props) Creates a new socket using the given properties.boolean
-
Field Details
-
NAMED_PIPE_PROP_NAME
- See Also:
-
-
Constructor Details
-
NamedPipeSocketFactory
public NamedPipeSocketFactory()Constructor for NamedPipeSocketFactory.
-
-
Method Details
-
afterHandshake
Description copied from interface:SocketFactoryCalled by the driver after issuing the MySQL protocol handshake and reading the results of the handshake.- Specified by:
afterHandshakein interfaceSocketFactory- Returns:
- the socket to use after the handshake
- Throws:
SocketException- if a socket error occursIOException- if an I/O error occurs- See Also:
-
beforeHandshake
Description copied from interface:SocketFactoryCalled by the driver before issuing the MySQL protocol handshake. Should return the socket instance that should be used during the handshake.- Specified by:
beforeHandshakein interfaceSocketFactory- Returns:
- the socket to use before the handshake
- Throws:
SocketException- if a socket error occursIOException- if an I/O error occurs- See Also:
-
connect
public Socket connect(String host, int portNumber, Properties props) throws SocketException, IOException Description copied from interface:SocketFactoryCreates 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).- Specified by:
connectin interfaceSocketFactory- Parameters:
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.- Returns:
- a socket connected to the given host
- Throws:
SocketException- if a socket error occursIOException- if an I/O error occurs- See Also:
-
isLocallyConnected
- Specified by:
isLocallyConnectedin interfaceSocketMetadata- Throws:
SQLException
-