接口 SocketConnection
-
public interface SocketConnectionRepresents physical connection with endpoint
-
-
方法概要
所有方法 实例方法 抽象方法 默认方法 修饰符和类型 方法 说明 voidconnect(String host, int port, PropertySet propertySet, ExceptionInterceptor exceptionInterceptor, Log log, int loginTimeout)Connect to the MySQL server and setup a stream connection.voidforceClose()ExceptionInterceptorgetExceptionInterceptor()StringgetHost()Returns the host this IO is connected toFullReadInputStreamgetMysqlInput()BufferedOutputStreamgetMysqlOutput()SocketgetMysqlSocket()NetworkResourcesgetNetworkResources()intgetPort()PropertySetgetPropertySet()SocketFactorygetSocketFactory()booleanisSSLEstablished()voidperformTlsHandshake(ServerSession serverSession)default voidperformTlsHandshake(ServerSession serverSession, Log log)Start a TLS handshakevoidsetMysqlInput(FullReadInputStream mysqlInput)voidsetSocketFactory(SocketFactory socketFactory)
-
-
-
方法详细资料
-
connect
void connect(String host, int port, PropertySet propertySet, ExceptionInterceptor exceptionInterceptor, Log log, int loginTimeout)
Connect to the MySQL server and setup a stream connection.- 参数:
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, IOException
-
performTlsHandshake
default void performTlsHandshake(ServerSession serverSession, Log log) throws SSLParamsException, FeatureNotAvailableException, IOException
Start a TLS handshake- 参数:
serverSession- server session state objectlog- logger- 抛出:
SSLParamsExceptionFeatureNotAvailableExceptionIOException
-
forceClose
void forceClose()
-
getNetworkResources
NetworkResources getNetworkResources()
-
getHost
String getHost()
Returns the host this IO is connected to- 返回:
- host name
-
getPort
int getPort()
-
getMysqlSocket
Socket getMysqlSocket() throws IOException
- 抛出:
IOException
-
getMysqlInput
FullReadInputStream getMysqlInput() throws IOException
- 抛出:
IOException
-
setMysqlInput
void setMysqlInput(FullReadInputStream mysqlInput)
-
getMysqlOutput
BufferedOutputStream getMysqlOutput() throws IOException
- 抛出:
IOException
-
isSSLEstablished
boolean isSSLEstablished()
-
getSocketFactory
SocketFactory getSocketFactory()
-
setSocketFactory
void setSocketFactory(SocketFactory socketFactory)
-
getExceptionInterceptor
ExceptionInterceptor getExceptionInterceptor()
-
getPropertySet
PropertySet getPropertySet()
-
-