Package bg.codexio.ai.openai.api.http
Record Class HttpExecutorContext
java.lang.Object
java.lang.Record
bg.codexio.ai.openai.api.http.HttpExecutorContext
- Record Components:
credentials-timeouts-
Context object holding authentication
and timeout configuration
-
Constructor Summary
ConstructorsConstructorDescriptionHttpExecutorContext(ApiCredentials credentials) Constructing the object with default timeouts.HttpExecutorContext(ApiCredentials credentials, HttpTimeouts timeouts) Creates an instance of aHttpExecutorContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecredentialsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.timeouts()Returns the value of thetimeoutsrecord component.final StringtoString()Returns a string representation of this record class.withCallTimeout(long timeout, TimeUnit timeUnit) withConnectTimeout(long timeout, TimeUnit timeUnit) withReadTimeout(long timeout, TimeUnit timeUnit)
-
Constructor Details
-
HttpExecutorContext
Constructing the object with default timeouts. 3 minutes for call, connect and read. -
HttpExecutorContext
Creates an instance of aHttpExecutorContextrecord class.- Parameters:
credentials- the value for thecredentialsrecord componenttimeouts- the value for thetimeoutsrecord component
-
-
Method Details
-
withCallTimeout
-
withConnectTimeout
-
withReadTimeout
-
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). -
credentials
Returns the value of thecredentialsrecord component.- Returns:
- the value of the
credentialsrecord component
-
timeouts
Returns the value of thetimeoutsrecord component.- Returns:
- the value of the
timeoutsrecord component
-