Asserts.check(!(iosession instanceof SSLIOSession), "I/O session is already upgraded to TLS/SSL");
final SSLIOSession ssliosession = new SSLIOSession(
iosession,
SSLMode.CLIENT,
this.sslContext,
new SSLSetupHandler() {
public void initalize(
final SSLEngine sslengine) throws SSLException {
if (supportedProtocols != null) {
sslengine.setEnabledProtocols(supportedProtocols);