Class SSLSocketChannel

java.lang.Object
org.java_websocket.SSLSocketChannel
All Implemented Interfaces:
Closeable, AutoCloseable, ByteChannel, Channel, ReadableByteChannel, WritableByteChannel, ISSLChannel, WrappedByteChannel

public class SSLSocketChannel extends Object implements WrappedByteChannel, ByteChannel, ISSLChannel
A class that represents an SSL/TLS peer, and can be extended to create a client or a server.

It makes use of the JSSE framework, and specifically the SSLEngine logic, which is described by Oracle as "an advanced API, not appropriate for casual use", since it requires the user to implement much of the communication establishment procedure himself. More information about it can be found here: http://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html#SSLEngine

SSLSocketChannel implements the handshake protocol, required to establish a connection between two peers, which is common for both client and server and provides the abstract read(ByteBuffer) and write(ByteBuffer) (String)} methods, that need to be implemented by the specific SSL/TLS peer that is going to extend this class.

Author:
Alex Karnezis

Modified by marci4 to allow the usage as a ByteChannel

Permission for usage received at May 25, 2017 by Alex Karnezis