Пример #1
0
 protected WebSocketContainer createInsecureSocketContainer()
     throws NoSuchAlgorithmException, KeyManagementException {
   ClientManager client = ClientManager.createClient();
   SslEngineConfigurator sslEngineConfigurator =
       new SslEngineConfigurator(SslUtils.createInsecureSslContext());
   sslEngineConfigurator.setHostnameVerifier(new SslUtils.AnyHostNameVerifier());
   client.getProperties().put(ClientProperties.SSL_ENGINE_CONFIGURATOR, sslEngineConfigurator);
   client.getProperties().put(ClientProperties.LOG_HTTP_UPGRADE, true);
   return client;
 }