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 void
authenticationComplete()
void
close()
ByteArrayInputStream
getInputStream()
ByteArrayOutputStream
getOutputStream()
boolean
isOpen()
boolean
isSSL()
byte[]
read()
void
setShouldUseSoLinger0()
void
upgradeToSSL(SSLSocketFactory sslSocketFactory, HostnameVerifier hostnameVerifier)
void
write(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()
-
setShouldUseSoLinger0
public void setShouldUseSoLinger0()
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChannel
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
-