Record Class OAuth2HttpClient.Builder
java.lang.Object
java.lang.Record
com.mastercard.developer.oauth2.http.java.OAuth2HttpClient.Builder
- All Implemented Interfaces:
HttpClient.Builder
- Enclosing class:
- OAuth2HttpClient
public static record OAuth2HttpClient.Builder(OAuth2Config config, HttpClient.Builder delegate)
extends Record
implements HttpClient.Builder
-
Field Summary
Fields inherited from interface java.net.http.HttpClient.Builder
NO_PROXY -
Constructor Summary
ConstructorsConstructorDescriptionBuilder(OAuth2Config config) Builder(OAuth2Config config, HttpClient.Builder delegate) Creates an instance of aBuilderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionauthenticator(Authenticator authenticator) build()config()Returns the value of theconfigrecord component.connectTimeout(Duration duration) cookieHandler(CookieHandler cookieHandler) delegate()Returns the value of thedelegaterecord component.final booleanIndicates whether some other object is "equal to" this one.followRedirects(HttpClient.Redirect policy) final inthashCode()Returns a hash code value for this object.priority(int priority) proxy(ProxySelector proxySelector) sslContext(SSLContext sslContext) sslParameters(SSLParameters sslParameters) final StringtoString()Returns a string representation of this record class.version(HttpClient.Version version)
-
Constructor Details
-
Builder
-
Builder
Creates an instance of aBuilderrecord class.- Parameters:
config- the value for theconfigrecord componentdelegate- the value for thedelegaterecord component
-
-
Method Details
-
build
- Specified by:
buildin interfaceHttpClient.Builder
-
version
- Specified by:
versionin interfaceHttpClient.Builder
-
priority
- Specified by:
priorityin interfaceHttpClient.Builder
-
followRedirects
- Specified by:
followRedirectsin interfaceHttpClient.Builder
-
connectTimeout
- Specified by:
connectTimeoutin interfaceHttpClient.Builder
-
proxy
- Specified by:
proxyin interfaceHttpClient.Builder
-
authenticator
- Specified by:
authenticatorin interfaceHttpClient.Builder
-
executor
- Specified by:
executorin interfaceHttpClient.Builder
-
sslContext
- Specified by:
sslContextin interfaceHttpClient.Builder
-
sslParameters
- Specified by:
sslParametersin interfaceHttpClient.Builder
-
cookieHandler
- Specified by:
cookieHandlerin interfaceHttpClient.Builder
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
config
Returns the value of theconfigrecord component.- Returns:
- the value of the
configrecord component
-
delegate
Returns the value of thedelegaterecord component.- Returns:
- the value of the
delegaterecord component
-