Class HttpCallsUtils


  • public class HttpCallsUtils
    extends Object
    Utility class containing HTTP related methods
    • Method Detail

      • getHttpAccessTimeoutFromProperties

        public static fr.paris.lutece.util.httpaccess.HttpAccess getHttpAccessTimeoutFromProperties​(String propertySocketTimeout,
                                                                                                    String propertyConnectionTimeout)
        Create a new HttpAccess Object with custom timeout values loaded from the 'properties' file
        Parameters:
        propertySocketTimeout - Name of the property containing the SocketTimeout value
        propertyConnectionTimeout - Name of the property containing the ConnectionTimeout value
        Returns:
        a new HttpAccess object with the specified timeout properties. If the properties had no value, then a default HttpAccess is returned
      • getHttpAccessWithCustomTimeout

        public static fr.paris.lutece.util.httpaccess.HttpAccess getHttpAccessWithCustomTimeout​(Integer valueSocketTimeout,
                                                                                                Integer valueConnectionTimeout)
        Create a new HttpAccess Object with custom timeout values
        Parameters:
        valueSocketTimeout - Value of the SocketTimeout in milliseconds - Set to null to use the default value
        valueConnectionTimeout - Value of the ConnectionTimeout in milliseconds - Set to null to use the default value
        Returns:
        a new HttpAccess object with the specified timeout values. If null values where provided, then a default HttpAccess is returned