Class HTTPUtils


  • public class HTTPUtils
    extends Object
    • Constructor Detail

      • HTTPUtils

        public HTTPUtils()
    • Method Detail

      • setTimeout

        public static void setTimeout​(javax.xml.rpc.Stub stub,
                                      int timeout)
        Sets connection timeout.
        Parameters:
        stub - The stub to set the property on
        timeout - the new timeout value in milliseconds
      • setCloseConnection

        public static void setCloseConnection​(javax.xml.rpc.Stub stub,
                                              boolean close)
        Sets on option on the stub to close the connection after receiving the reply (connection will not be reused).
        Parameters:
        stub - The stub to set the property on
        close - If true, connection close will be requested. Otherwise connection close will not be requested.
      • setHTTP10Version

        public static void setHTTP10Version​(javax.xml.rpc.Stub stub,
                                            boolean enable)
        Sets on option on the stub to control what HTTP protocol version should be used.
        Parameters:
        stub - The stub to set the property on
        enable - If true, HTTP 1.0 will be used. If false, HTTP 1.1 will be used.
      • setHTTPVersion

        public static void setHTTPVersion​(javax.xml.rpc.Stub stub,
                                          boolean http10)
        Sets on option on the stub to control what HTTP protocol version should be used.
        Parameters:
        stub - The stub to set the property on
        http10 - If true, HTTP 1.0 will be used. Otherwise HTTP 1.1 will be used.
      • setChunkedEncoding

        public static void setChunkedEncoding​(javax.xml.rpc.Stub stub,
                                              boolean enable)
        Sets on option on the stub to use to enable or disable chunked encoding (only if used with HTTP 1.1).
        Parameters:
        stub - The stub to set the property on
        enable - If true, chunked encoding will be enabled. If false, chunked encoding will be disabled.
      • setDisableChunking

        public static void setDisableChunking​(javax.xml.rpc.Stub stub,
                                              boolean disable)
        Sets on option on the stub to use to disable chunking (only if used with HTTP 1.1).
        Parameters:
        stub - The stub to set the property on
        disable - If true, chunking will be disabled. Otherwise chunking will be performed (if HTTP 1.1 will be used).