Package org.jppf.nio
Class SSLHandlerImpl
java.lang.Object
org.jppf.nio.AbstractSSLHandler
org.jppf.nio.SSLHandlerImpl
- All Implemented Interfaces:
SSLHandler
Wrapper for an
SSLEngine and an associated channel.-
Constructor Summary
ConstructorsConstructorDescriptionSSLHandlerImpl(SocketChannel channel, SSLEngine sslEngine) Instantiate this SSLHandler with the specified channel and SSL engine. -
Method Summary
Methods inherited from class org.jppf.nio.AbstractSSLHandler
getAppReceiveBuffer, getAppSendBuffer, getChannelReadCount, getChannelWriteCount, getNetReceiveBuffer, getNetSendBuffer, getSslEngine, toString
-
Constructor Details
-
SSLHandlerImpl
Instantiate this SSLHandler with the specified channel and SSL engine.- Parameters:
channel- the channel from which data is read or to which data is written.sslEngine- performs the SSL-related operations before sending data/after receiving data.- Throws:
Exception- if any error occurs.
-
-
Method Details
-
read
Description copied from interface:SSLHandlerRead from the channel via the SSLEngine into the application receive buffer. Called in blocking mode when input is expected, or in non-blocking mode when the channel is readable.- Returns:
- the number of bytes read from the application receive buffer.
- Throws:
Exception- if any error occurs.
-
write
Description copied from interface:SSLHandlerWrite from the application send buffer to the channel via the SSLEngine.- Returns:
- the number of bytes consumed from the application.
- Throws:
Exception- if any error occurs.
-
close
Description copied from interface:SSLHandlerClose the underlying channel and SSL engine.- Throws:
Exception- if any error occurs.
-