Class PacketChannel
- java.lang.Object
-
- com.github.shyiko.mysql.binlog.network.protocol.PacketChannel
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Channel
public class PacketChannel extends Object implements Channel
- Author:
- Stanley Shyiko
-
-
Constructor Summary
Constructors Constructor Description PacketChannel(String hostname, int port)PacketChannel(Socket socket)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidauthenticationComplete()voidclose()ByteArrayInputStreamgetInputStream()ByteArrayOutputStreamgetOutputStream()booleanisOpen()booleanisSSL()byte[]read()voidupgradeToSSL(SSLSocketFactory sslSocketFactory, HostnameVerifier hostnameVerifier)voidwrite(Command command)
-
-
-
Constructor Detail
-
PacketChannel
public PacketChannel(String hostname, int port) throws IOException
- Throws:
IOException
-
PacketChannel
public PacketChannel(Socket socket) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getInputStream
public ByteArrayInputStream getInputStream()
-
getOutputStream
public ByteArrayOutputStream getOutputStream()
-
authenticationComplete
public void authenticationComplete()
-
read
public byte[] read() throws IOException- Throws:
IOException
-
write
public void write(Command command) throws IOException
- Throws:
IOException
-
upgradeToSSL
public void upgradeToSSL(SSLSocketFactory sslSocketFactory, HostnameVerifier hostnameVerifier) throws IOException
- Throws:
IOException
-
isSSL
public boolean isSSL()
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-