Wrap this transport's output and input to apply SSL encryption and decryption respectively.
This method is expected to be called at most once. A subsequent invocation will return the same
{@link Ssl} object, regardless of the parameters supplied.
@param sslDomain the SSL settings to use
@param sslPeerDetails peer details, used for SNI, hostname verification, etc when connecting. May be null.
@return an {@link Ssl} object representing the SSL session.
@throws IllegalArgumentException if the sslDomain requests hostname verification but sslPeerDetails are null.
@throws IllegalStateException if the sslDomain has not been initialised.
Wrap this transport's output and input to apply SSL encryption and decryption respectively.
This method is expected to be called at most once. A subsequent invocation will return the same {@link Ssl} object, regardless of the parameters supplied.
@param sslDomain the SSL settings to use @param sslPeerDetails peer details, used for SNI, hostname verification, etc when connecting. May be null. @return an {@link Ssl} object representing the SSL session. @throws IllegalArgumentException if the sslDomain requests hostname verification but sslPeerDetails are null. @throws IllegalStateException if the sslDomain has not been initialised.