Package com.mysql.cj.protocol
Class AbstractSocketConnection
java.lang.Object
com.mysql.cj.protocol.AbstractSocketConnection
- All Implemented Interfaces:
SocketConnection
- Direct Known Subclasses:
NativeSocketConnection
public abstract class AbstractSocketConnection extends java.lang.Object implements SocketConnection
-
Field Summary
Fields Modifier and Type Field Description protected ExceptionInterceptor
exceptionInterceptor
protected java.lang.String
host
protected FullReadInputStream
mysqlInput
protected java.io.BufferedOutputStream
mysqlOutput
protected java.net.Socket
mysqlSocket
protected int
port
protected PropertySet
propertySet
protected SocketFactory
socketFactory
-
Constructor Summary
Constructors Constructor Description AbstractSocketConnection()
-
Method Summary
Modifier and Type Method Description protected SocketFactory
createSocketFactory(java.lang.String socketFactoryClassName)
void
forceClose()
Forcibly closes the underlying socket to MySQL.ExceptionInterceptor
getExceptionInterceptor()
java.lang.String
getHost()
Returns the host this IO is connected toFullReadInputStream
getMysqlInput()
java.io.BufferedOutputStream
getMysqlOutput()
java.net.Socket
getMysqlSocket()
NetworkResources
getNetworkResources()
int
getPort()
PropertySet
getPropertySet()
SocketFactory
getSocketFactory()
boolean
isSSLEstablished()
void
setMysqlInput(FullReadInputStream mysqlInput)
void
setSocketFactory(SocketFactory socketFactory)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.mysql.cj.protocol.SocketConnection
connect, performTlsHandshake
-
Field Details
-
host
protected java.lang.String host -
port
protected int port -
socketFactory
-
mysqlSocket
protected java.net.Socket mysqlSocket -
mysqlInput
-
mysqlOutput
protected java.io.BufferedOutputStream mysqlOutput -
exceptionInterceptor
-
propertySet
-
-
Constructor Details
-
AbstractSocketConnection
public AbstractSocketConnection()
-
-
Method Details
-
getHost
public java.lang.String getHost()Description copied from interface:SocketConnection
Returns the host this IO is connected to- Specified by:
getHost
in interfaceSocketConnection
- Returns:
- host name
-
getPort
public int getPort()- Specified by:
getPort
in interfaceSocketConnection
-
getMysqlSocket
public java.net.Socket getMysqlSocket()- Specified by:
getMysqlSocket
in interfaceSocketConnection
-
getMysqlInput
- Specified by:
getMysqlInput
in interfaceSocketConnection
- Throws:
java.io.IOException
-
setMysqlInput
- Specified by:
setMysqlInput
in interfaceSocketConnection
-
getMysqlOutput
public java.io.BufferedOutputStream getMysqlOutput() throws java.io.IOException- Specified by:
getMysqlOutput
in interfaceSocketConnection
- Throws:
java.io.IOException
-
isSSLEstablished
public boolean isSSLEstablished()- Specified by:
isSSLEstablished
in interfaceSocketConnection
-
getSocketFactory
- Specified by:
getSocketFactory
in interfaceSocketConnection
-
setSocketFactory
- Specified by:
setSocketFactory
in interfaceSocketConnection
-
forceClose
public void forceClose()Forcibly closes the underlying socket to MySQL.- Specified by:
forceClose
in interfaceSocketConnection
-
getNetworkResources
- Specified by:
getNetworkResources
in interfaceSocketConnection
-
getExceptionInterceptor
- Specified by:
getExceptionInterceptor
in interfaceSocketConnection
-
getPropertySet
- Specified by:
getPropertySet
in interfaceSocketConnection
-
createSocketFactory
-