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 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.void
forceClose()
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
performTlsHandshake(ServerSession serverSession)
void
setMysqlInput(FullReadInputStream mysqlInput)
void
setSocketFactory(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:
SSLParamsException
FeatureNotAvailableException
java.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()
-