Class HTTPUtils


  • public class HTTPUtils
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DISABLE_CHUNKING  
    • Constructor Summary

      Constructors 
      Constructor Description
      HTTPUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      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).
      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).
      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).
      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.
      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.
      static void setTimeout​(javax.xml.rpc.Stub stub, int timeout)
      Sets connection timeout.
      • Methods inherited from class java.lang.Object

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

      • DISABLE_CHUNKING

        public static final java.lang.String DISABLE_CHUNKING
        See Also:
        Constant Field Values
    • 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).