|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mysql.jdbc.StandardSocketFactory
Socket factory for vanilla TCP/IP sockets (the standard)
Field Summary | |
protected java.lang.String |
host
The hostname to connect to |
protected int |
port
The port number to connect to |
protected java.net.Socket |
rawSocket
The underlying TCP/IP socket to use |
Constructor Summary | |
StandardSocketFactory()
|
Method Summary | |
java.net.Socket |
afterHandshake()
Called by the driver after issuing the MySQL protocol handshake and reading the results of the handshake. |
java.net.Socket |
beforeHandshake()
Called by the driver before issuing the MySQL protocol handshake. |
java.net.Socket |
connect(java.lang.String host,
java.util.Properties props)
Creates a new socket using the given properties. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.net.Socket rawSocket
protected java.lang.String host
protected int port
Constructor Detail |
public StandardSocketFactory()
Method Detail |
public java.net.Socket afterHandshake() throws java.net.SocketException, java.io.IOException
afterHandshake
in interface SocketFactory
java.net.SocketException
- if a socket error occurs
java.io.IOException
- if an I/O error occurspublic java.net.Socket beforeHandshake() throws java.net.SocketException, java.io.IOException
beforeHandshake
in interface SocketFactory
java.net.SocketException
- if a socket error occurs
java.io.IOException
- if an I/O error occurspublic java.net.Socket connect(java.lang.String host, java.util.Properties props) throws java.net.SocketException, java.io.IOException
SocketFactory
com.mysql.jdbc.StandardSocketFactory
Implementing classes
are responsible for handling synchronization of this method (if
needed).
connect
in interface SocketFactory
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.props
- properties passed to the driver via the URL and/or properties
instance.
java.io.IOException
- if an I/O error occurs
java.net.SocketException
- if a socket error occurscom.mysql.jdbc.SocketFactory#createSocket(Properties)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |