This is a sample that implements an HTTP Server and an HTTP Cliente that can be useful for learning or debugging purposes
If you want to debug SSL handshake by looking at the log messages that are generated, add the option -Djavax.net.debug=ALL
to java command.