Top Description Methods
com.mysql.cj.protocol

public Interface SocketConnection

Known Direct Implementers
com.mysql.cj.protocol.a.NativeSocketConnection, com.mysql.cj.protocol.AbstractSocketConnection
Imports
java.io.BufferedOutputStream, .IOException, java.net.Socket, com.mysql.cj.conf.PropertySet, com.mysql.cj.exceptions.ExceptionInterceptor, .FeatureNotAvailableException, .SSLParamsException, com.mysql.cj.log.Log

Represents physical connection with endpoint

Method Summary

Modifier and TypeMethod and Description
public void
connect(String
the hostname to connect to
host
,
int
the port number that the server is listening on
port
,
PropertySet
the PropertySet with required connection options
propertySet
,
ExceptionInterceptor
exception interceptor
exceptionInterceptor
,
Log
logger
log
,
int
the driver login time limit in milliseconds
loginTimeout
)

Connect to the MySQL server and setup a stream connection.

public void
public ExceptionInterceptor
public String

Returns:

host name
getHost
()

Returns the host this IO is connected to

public FullReadInputStream
public BufferedOutputStream
public Socket
public NetworkResources
public int
public PropertySet
public SocketFactory
public boolean
public void
public default void
performTlsHandshake(ServerSession
server session state object
serverSession
,
Log
logger
log
)

Start a TLS handshake

public void
public void

Method Detail

connectback to summary
public void connect(String host, int port, PropertySet propertySet, ExceptionInterceptor exceptionInterceptor, Log log, int loginTimeout)

Connect to the MySQL server and setup a stream connection.

Parameters
host:String

the hostname to connect to

port:int

the port number that the server is listening on

propertySet:PropertySet

the PropertySet with required connection options

exceptionInterceptor:ExceptionInterceptor

exception interceptor

log:Log

logger

loginTimeout:int

the driver login time limit in milliseconds

forceCloseback to summary
public void forceClose()
getExceptionInterceptorback to summary
public ExceptionInterceptor getExceptionInterceptor()
getHostback to summary
public String getHost()

Returns the host this IO is connected to

Returns:String

host name

getMysqlInputback to summary
public FullReadInputStream getMysqlInput() throws IOException
getMysqlOutputback to summary
public BufferedOutputStream getMysqlOutput() throws IOException
getMysqlSocketback to summary
public Socket getMysqlSocket() throws IOException
getNetworkResourcesback to summary
public NetworkResources getNetworkResources()
getPortback to summary
public int getPort()
getPropertySetback to summary
public PropertySet getPropertySet()
getSocketFactoryback to summary
public SocketFactory getSocketFactory()
isSSLEstablishedback to summary
public boolean isSSLEstablished()
performTlsHandshakeback to summary
public void performTlsHandshake(ServerSession serverSession) throws SSLParamsException, FeatureNotAvailableException, IOException
performTlsHandshakeback to summary
public default void performTlsHandshake(ServerSession serverSession, Log log) throws SSLParamsException, FeatureNotAvailableException, IOException

Start a TLS handshake

Parameters
serverSession:ServerSession

server session state object

log:Log

logger

Exceptions
SSLParamsException:
in case of failure
FeatureNotAvailableException:
in case of failure
IOException:
in case of failure
setMysqlInputback to summary
public void setMysqlInput(FullReadInputStream mysqlInput)
setSocketFactoryback to summary
public void setSocketFactory(SocketFactory socketFactory)