Package net.snowflake.client.core

## Class HttpExecutingContextBuilder

- java.lang.Object
- - net.snowflake.client.core.HttpExecutingContextBuilder

    @SnowflakeJdbcInternalApi
    public class HttpExecutingContextBuilder
    extends Object

Builder class for `HttpExecutingContext`. Provides a fluent interface for constructing HttpExecutingContext instances with many optional parameters.

### Constructor Summary

Constructors
`HttpExecutingContextBuilder​(String requestId, String requestInfoScrubbed)` Creates a new builder instance with required parameters.
`HttpExecutingContextBuilder​(HttpExecutingContext context)` Copy constructor to create a new builder from an existing HttpExecutingContext.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`HttpExecutingContextBuilder` `authTimeout​(long authTimeout)` Sets the authentication timeout in seconds.
`HttpExecutingContext` `build()` Builds and returns a new HttpExecutingContext instance with the configured parameters.
`HttpExecutingContextBuilder` `canceling​(AtomicBoolean canceling)` Sets the canceling flag.
`static HttpExecutingContextBuilder` `forLogin​(String requestId, String requestInfoScrubbed)` Creates a new builder for a login request with common defaults.
`static HttpExecutingContextBuilder` `forQuery​(String requestId, String requestInfoScrubbed)` Creates a new builder for a query request with common defaults.
`static HttpExecutingContextBuilder` `forSimpleRequest​(String requestId, String requestInfoScrubbed)` Creates a new builder for a simple HTTP request with minimal retry settings.
`HttpExecutingContextBuilder` `includeRequestGuid​(boolean includeRequestGuid)` Sets whether to include request GUID.
`HttpExecutingContextBuilder` `includeRetryParameters​(boolean includeRetryParameters)` Sets whether to include retry parameters in requests.
`HttpExecutingContextBuilder` `injectSocketTimeout​(int injectSocketTimeout)` Sets the injected socket timeout for testing.
`HttpExecutingContextBuilder` `loginRequest​(boolean isLoginRequest)` Sets whether this is a login request.
`HttpExecutingContextBuilder` `maxRetries​(int maxRetries)` Sets the maximum number of retries.
`HttpExecutingContextBuilder` `noRetry​(boolean noRetry)` Sets whether to disable retries.
`HttpExecutingContextBuilder` `origSocketTimeout​(int origSocketTimeout)` Sets the original socket timeout in milliseconds.
`HttpExecutingContextBuilder` `retryHTTP403​(boolean retryHTTP403)` Sets whether to retry on HTTP 403 errors.
`HttpExecutingContextBuilder` `retryTimeout​(long retryTimeout)` Sets the retry timeout in seconds.
`HttpExecutingContextBuilder` `unpackResponse​(boolean unpackResponse)` Sets whether to unpack the response.
`HttpExecutingContextBuilder` `withoutCookies​(boolean withoutCookies)` Sets whether to disable cookies.
`static HttpExecutingContextBuilder` `withRequest​(String requestId, String requestInfoScrubbed)` Creates a new builder with default settings for retryable requests.
`HttpExecutingContextBuilder` `withSfSession​(SFBaseSession sfSession)` Sets the session associated with this context.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### HttpExecutingContextBuilder

    public HttpExecutingContextBuilder​(String requestId,
                                       String requestInfoScrubbed)

Creates a new builder instance with required parameters.

Parameters:
  `requestId` - Request ID for logging and tracking
  `requestInfoScrubbed` - Scrubbed request info for logging

#### HttpExecutingContextBuilder

    public HttpExecutingContextBuilder​(HttpExecutingContext context)

Copy constructor to create a new builder from an existing HttpExecutingContext.

Parameters:
  `context` - The context to copy settings from

### Method Detail

#### forLogin

    public static HttpExecutingContextBuilder forLogin​(String requestId,
                                                       String requestInfoScrubbed)

Creates a new builder for a login request with common defaults.

Parameters:
  `requestId` - Request ID for logging and tracking
  `requestInfoScrubbed` - Scrubbed request info for logging
Returns:
  A new builder instance configured for login requests

#### forQuery

    public static HttpExecutingContextBuilder forQuery​(String requestId,
                                                       String requestInfoScrubbed)

Creates a new builder for a query request with common defaults.

Parameters:
  `requestId` - Request ID for logging and tracking
  `requestInfoScrubbed` - Scrubbed request info for logging
Returns:
  A new builder instance configured for query requests

#### forSimpleRequest

    public static HttpExecutingContextBuilder forSimpleRequest​(String requestId,
                                                               String requestInfoScrubbed)

Creates a new builder for a simple HTTP request with minimal retry settings.

Parameters:
  `requestId` - Request ID for logging and tracking
  `requestInfoScrubbed` - Scrubbed request info for logging
Returns:
  A new builder instance configured for simple requests

#### withRequest

    public static HttpExecutingContextBuilder withRequest​(String requestId,
                                                          String requestInfoScrubbed)

Creates a new builder with default settings for retryable requests.

Parameters:
  `requestId` - Request ID for logging and tracking
  `requestInfoScrubbed` - Scrubbed request info for logging
Returns:
  A new builder instance with default retry settings

#### retryTimeout

    public HttpExecutingContextBuilder retryTimeout​(long retryTimeout)

Sets the retry timeout in seconds.

Parameters:
  `retryTimeout` - Retry timeout in seconds
Returns:
  this builder instance

#### authTimeout

    public HttpExecutingContextBuilder authTimeout​(long authTimeout)

Sets the authentication timeout in seconds.

Parameters:
  `authTimeout` - Authentication timeout in seconds
Returns:
  this builder instance

#### origSocketTimeout

    public HttpExecutingContextBuilder origSocketTimeout​(int origSocketTimeout)

Sets the original socket timeout in milliseconds.

Parameters:
  `origSocketTimeout` - Socket timeout in milliseconds
Returns:
  this builder instance

#### maxRetries

    public HttpExecutingContextBuilder maxRetries​(int maxRetries)

Sets the maximum number of retries.

Parameters:
  `maxRetries` - Maximum number of retries
Returns:
  this builder instance

#### injectSocketTimeout

    public HttpExecutingContextBuilder injectSocketTimeout​(int injectSocketTimeout)

Sets the injected socket timeout for testing.

Parameters:
  `injectSocketTimeout` - Socket timeout to inject
Returns:
  this builder instance

#### canceling

    public HttpExecutingContextBuilder canceling​(AtomicBoolean canceling)

Sets the canceling flag.

Parameters:
  `canceling` - AtomicBoolean for cancellation
Returns:
  this builder instance

#### withoutCookies

    public HttpExecutingContextBuilder withoutCookies​(boolean withoutCookies)

Sets whether to disable cookies.

Parameters:
  `withoutCookies` - true to disable cookies
Returns:
  this builder instance

#### includeRetryParameters

    public HttpExecutingContextBuilder includeRetryParameters​(boolean includeRetryParameters)

Sets whether to include retry parameters in requests.

Parameters:
  `includeRetryParameters` - true to include retry parameters
Returns:
  this builder instance

#### includeRequestGuid

    public HttpExecutingContextBuilder includeRequestGuid​(boolean includeRequestGuid)

Sets whether to include request GUID.

Parameters:
  `includeRequestGuid` - true to include request GUID
Returns:
  this builder instance

#### retryHTTP403

    public HttpExecutingContextBuilder retryHTTP403​(boolean retryHTTP403)

Sets whether to retry on HTTP 403 errors.

Parameters:
  `retryHTTP403` - true to retry on HTTP 403
Returns:
  this builder instance

#### noRetry

    public HttpExecutingContextBuilder noRetry​(boolean noRetry)

Sets whether to disable retries.

Parameters:
  `noRetry` - true to disable retries
Returns:
  this builder instance

#### unpackResponse

    public HttpExecutingContextBuilder unpackResponse​(boolean unpackResponse)

Sets whether to unpack the response.

Parameters:
  `unpackResponse` - true to unpack response
Returns:
  this builder instance

#### loginRequest

    public HttpExecutingContextBuilder loginRequest​(boolean isLoginRequest)

Sets whether this is a login request.

Parameters:
  `isLoginRequest` - true if this is a login request
Returns:
  this builder instance

#### withSfSession

    public HttpExecutingContextBuilder withSfSession​(SFBaseSession sfSession)

Sets the session associated with this context.

Parameters:
  `sfSession` - SFBaseSession to associate with this context
Returns:
  this builder instance

#### build

    public HttpExecutingContext build()

Builds and returns a new HttpExecutingContext instance with the configured parameters.

Returns:
  A new HttpExecutingContext instance