Class ClientUtil


  • public class ClientUtil
    extends java.lang.Object
    Version:
    0.9, 26/12/2012
    Author:
    Yuriy Zabrovarnyy, Yuriy Movchan
    • Constructor Summary

      Constructors 
      Constructor Description
      ClientUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.apache.http.impl.client.CloseableHttpClient createHttpClient​(java.lang.String tlsVersion, java.lang.String[] ciphers)
      Creates a special SSLContext using a custom TLS version and a set of ciphers enabled to process SSL connections.
      static java.util.List<java.lang.String> extractListByKey​(org.json.JSONObject jsonObject, java.lang.String key)  
      static java.lang.String toPrettyJson​(org.json.JSONObject jsonObject)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ClientUtil

        public ClientUtil()
    • Method Detail

      • toPrettyJson

        public static java.lang.String toPrettyJson​(org.json.JSONObject jsonObject)
                                             throws com.fasterxml.jackson.core.JsonProcessingException
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException
      • extractListByKey

        public static java.util.List<java.lang.String> extractListByKey​(org.json.JSONObject jsonObject,
                                                                        java.lang.String key)
      • createHttpClient

        public static org.apache.http.impl.client.CloseableHttpClient createHttpClient​(java.lang.String tlsVersion,
                                                                                       java.lang.String[] ciphers)
        Creates a special SSLContext using a custom TLS version and a set of ciphers enabled to process SSL connections.
        Parameters:
        tlsVersion - TLS version, for example TLSv1.2
        ciphers - Set of ciphers used to create connections.