Record Class HttpHandlerConfig
java.lang.Object
java.lang.Record
com.inductiveautomation.eventstream.config.handler.HttpHandlerConfig
- Record Components:
type- HTTP method used for each request.- whether cookies returned by the server are stored and sent back.connectTimeoutMs- maximum time to establish a connection, in milliseconds.requestTimeoutMs- maximum time to wait for a response after a request is sent, in milliseconds. Zero waits indefinitely.httpVersion- preferred HTTP protocol version.url- expression producing the request URL.headers- expressions producing additional request headers.body- expression producing the request body.
public record HttpHandlerConfig(HttpHandlerConfig.Type type, boolean cookiesEnabled, int connectTimeoutMs, int requestTimeoutMs, HttpHandlerConfig.HttpVersion httpVersion, ExpressionValue url, List<HttpHandlerConfig.Header> headers, ExpressionValue body)
extends Record
Configuration for the HTTP handler.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic enumstatic enum -
Constructor Summary
ConstructorsConstructorDescriptionHttpHandlerConfig(HttpHandlerConfig.Type type, boolean cookiesEnabled, int connectTimeoutMs, int requestTimeoutMs, HttpHandlerConfig.HttpVersion httpVersion, ExpressionValue url, List<HttpHandlerConfig.Header> headers, ExpressionValue body) Creates an instance of aHttpHandlerConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbody()Returns the value of thebodyrecord component.intReturns the value of theconnectTimeoutMsrecord component.booleanReturns the value of thecookiesEnabledrecord component.final booleanIndicates whether some other object is "equal to" this one.static HttpHandlerConfigfromJson(@Nullable com.inductiveautomation.ignition.common.gson.JsonObject config) final inthashCode()Returns a hash code value for this object.headers()Returns the value of theheadersrecord component.Returns the value of thehttpVersionrecord component.intReturns the value of therequestTimeoutMsrecord component.com.inductiveautomation.ignition.common.gson.JsonObjecttoJson()final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.url()Returns the value of theurlrecord component.
-
Constructor Details
-
HttpHandlerConfig
public HttpHandlerConfig(HttpHandlerConfig.Type type, boolean cookiesEnabled, int connectTimeoutMs, int requestTimeoutMs, HttpHandlerConfig.HttpVersion httpVersion, ExpressionValue url, List<HttpHandlerConfig.Header> headers, ExpressionValue body) Creates an instance of aHttpHandlerConfigrecord class.- Parameters:
type- the value for thetyperecord componentcookiesEnabled- the value for thecookiesEnabledrecord componentconnectTimeoutMs- the value for theconnectTimeoutMsrecord componentrequestTimeoutMs- the value for therequestTimeoutMsrecord componenthttpVersion- the value for thehttpVersionrecord componenturl- the value for theurlrecord componentheaders- the value for theheadersrecord componentbody- the value for thebodyrecord component
-
-
Method Details
-
fromJson
public static HttpHandlerConfig fromJson(@Nullable com.inductiveautomation.ignition.common.gson.JsonObject config) -
toJson
public com.inductiveautomation.ignition.common.gson.JsonObject toJson() -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
cookiesEnabled
public boolean cookiesEnabled()Returns the value of thecookiesEnabledrecord component.- Returns:
- the value of the
cookiesEnabledrecord component
-
connectTimeoutMs
public int connectTimeoutMs()Returns the value of theconnectTimeoutMsrecord component.- Returns:
- the value of the
connectTimeoutMsrecord component
-
requestTimeoutMs
public int requestTimeoutMs()Returns the value of therequestTimeoutMsrecord component.- Returns:
- the value of the
requestTimeoutMsrecord component
-
httpVersion
Returns the value of thehttpVersionrecord component.- Returns:
- the value of the
httpVersionrecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
headers
Returns the value of theheadersrecord component.- Returns:
- the value of the
headersrecord component
-
body
Returns the value of thebodyrecord component.- Returns:
- the value of the
bodyrecord component
-