java.lang.Object
com.mysql.jdbc.StandardSocketFactory
- All Implemented Interfaces:
- SocketFactory
- public class StandardSocketFactory
- extends java.lang.Object
- implements SocketFactory
Socket factory for vanilla TCP/IP sockets (the standard)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
rawSocket
protected java.net.Socket rawSocket
- The underlying TCP/IP socket to use
host
protected java.lang.String host
- The hostname to connect to
port
protected int port
- The port number to connect to
StandardSocketFactory
public StandardSocketFactory()
afterHandshake
public java.net.Socket afterHandshake()
throws java.net.SocketException,
java.io.IOException
- Called by the driver after issuing the MySQL protocol handshake and
reading the results of the handshake.
- Specified by:
afterHandshake in interface SocketFactory
beforeHandshake
public java.net.Socket beforeHandshake()
throws java.net.SocketException,
java.io.IOException
- Called by the driver before issuing the MySQL protocol handshake. Should
return the socket instance that should be used during the handshake.
- Specified by:
beforeHandshake in interface SocketFactory
connect
public java.net.Socket connect(java.lang.String host,
int portNumber,
java.util.Properties props)
throws java.net.SocketException,
java.io.IOException
- Description copied from interface:
SocketFactory
- 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).
- Specified by:
connect in interface SocketFactory