Package com.mysql.cj.protocol
Interface SocketConnection
- All Known Implementing Classes:
AbstractSocketConnection,NativeSocketConnection
public interface SocketConnection
Represents physical connection with endpoint
-
Method Summary
Modifier and Type Method Description voidconnect(java.lang.String host, int port, PropertySet propertySet, ExceptionInterceptor exceptionInterceptor, Log log, int loginTimeout)Connect to the MySQL server and setup a stream connection.voidforceClose()ExceptionInterceptorgetExceptionInterceptor()java.lang.StringgetHost()Returns the host this IO is connected toFullReadInputStreamgetMysqlInput()java.io.BufferedOutputStreamgetMysqlOutput()java.net.SocketgetMysqlSocket()NetworkResourcesgetNetworkResources()intgetPort()PropertySetgetPropertySet()SocketFactorygetSocketFactory()booleanisSSLEstablished()voidperformTlsHandshake(ServerSession serverSession)voidsetMysqlInput(FullReadInputStream mysqlInput)voidsetSocketFactory(SocketFactory socketFactory)
-
Method Details
-
connect
void connect(java.lang.String host, int port, PropertySet propertySet, ExceptionInterceptor exceptionInterceptor, Log log, int loginTimeout)Connect to the MySQL server and setup a stream connection.- Parameters:
host- the hostname to connect toport- the port number that the server is listening onpropertySet- the PropertySet with required connection optionsexceptionInterceptor- exception interceptorlog- loggerloginTimeout- the driver login time limit in milliseconds
-
performTlsHandshake
void performTlsHandshake(ServerSession serverSession) throws SSLParamsException, FeatureNotAvailableException, java.io.IOException- Throws:
SSLParamsExceptionFeatureNotAvailableExceptionjava.io.IOException
-
forceClose
void forceClose() -
getNetworkResources
NetworkResources getNetworkResources() -
getHost
java.lang.String getHost()Returns the host this IO is connected to- Returns:
- host name
-
getPort
int getPort() -
getMysqlSocket
java.net.Socket getMysqlSocket() throws java.io.IOException- Throws:
java.io.IOException
-
getMysqlInput
- Throws:
java.io.IOException
-
setMysqlInput
-
getMysqlOutput
java.io.BufferedOutputStream getMysqlOutput() throws java.io.IOException- Throws:
java.io.IOException
-
isSSLEstablished
boolean isSSLEstablished() -
getSocketFactory
SocketFactory getSocketFactory() -
setSocketFactory
-
getExceptionInterceptor
ExceptionInterceptor getExceptionInterceptor() -
getPropertySet
PropertySet getPropertySet()
-