catch (GeneralSecurityException e)
{
throw new ServerScopedRuntimeException("Cannot configure port " + port.getName() + " for transport " + Transport.SSL, e);
}
connector = port.getTransports().contains(Transport.TCP)
? new TcpAndSslSelectChannelConnector(factory)
: new SslSelectChannelConnector(factory);
return connector;
}