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 ExceptionInterceptorexceptionInterceptorprotected java.lang.Stringhostprotected FullReadInputStreammysqlInputprotected java.io.BufferedOutputStreammysqlOutputprotected java.net.SocketmysqlSocketprotected intportprotected PropertySetpropertySetprotected SocketFactorysocketFactory -
Constructor Summary
Constructors Constructor Description AbstractSocketConnection() -
Method Summary
Modifier and Type Method Description protected SocketFactorycreateSocketFactory(java.lang.String socketFactoryClassName)voidforceClose()Forcibly closes the underlying socket to MySQL.ExceptionInterceptorgetExceptionInterceptor()java.lang.StringgetHost()Returns the host this IO is connected toFullReadInputStreamgetMysqlInput()java.io.BufferedOutputStreamgetMysqlOutput()java.net.SocketgetMysqlSocket()NetworkResourcesgetNetworkResources()intgetPort()PropertySetgetPropertySet()SocketFactorygetSocketFactory()booleanisSSLEstablished()voidsetMysqlInput(FullReadInputStream mysqlInput)voidsetSocketFactory(SocketFactory socketFactory)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:SocketConnectionReturns the host this IO is connected to- Specified by:
getHostin interfaceSocketConnection- Returns:
- host name
-
getPort
public int getPort()- Specified by:
getPortin interfaceSocketConnection
-
getMysqlSocket
public java.net.Socket getMysqlSocket()- Specified by:
getMysqlSocketin interfaceSocketConnection
-
getMysqlInput
- Specified by:
getMysqlInputin interfaceSocketConnection- Throws:
java.io.IOException
-
setMysqlInput
- Specified by:
setMysqlInputin interfaceSocketConnection
-
getMysqlOutput
public java.io.BufferedOutputStream getMysqlOutput() throws java.io.IOException- Specified by:
getMysqlOutputin interfaceSocketConnection- Throws:
java.io.IOException
-
isSSLEstablished
public boolean isSSLEstablished()- Specified by:
isSSLEstablishedin interfaceSocketConnection
-
getSocketFactory
- Specified by:
getSocketFactoryin interfaceSocketConnection
-
setSocketFactory
- Specified by:
setSocketFactoryin interfaceSocketConnection
-
forceClose
public void forceClose()Forcibly closes the underlying socket to MySQL.- Specified by:
forceClosein interfaceSocketConnection
-
getNetworkResources
- Specified by:
getNetworkResourcesin interfaceSocketConnection
-
getExceptionInterceptor
- Specified by:
getExceptionInterceptorin interfaceSocketConnection
-
getPropertySet
- Specified by:
getPropertySetin interfaceSocketConnection
-
createSocketFactory
-