Package org.apache.juneau.rest.client
Record Class TransportHeader
java.lang.Object
java.lang.Record
org.apache.juneau.rest.client.TransportHeader
- Record Components:
name- The header name. Nevernull.value- The header value. Nevernull.
An HTTP header name/value pair as seen by the transport layer.
Unlike HttpHeader, this is a fully-resolved, eagerly-evaluated value;
suppliers have already been invoked and null-valued headers have already been filtered out before
a TransportRequest is constructed.
- Since:
- 9.2.1
-
Constructor Summary
ConstructorsConstructorDescriptionTransportHeader(String name, String value) Compact canonical constructor — validates that neither field isnull. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.static TransportHeaderFactory method.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
TransportHeader
Compact canonical constructor — validates that neither field isnull.- Parameters:
name- The header name. Must not benull .value- The header value. Must not benull .
-
-
Method Details
-
of
Factory method.- Parameters:
name- The header name. Must not benull .value- The header value. Must not benull .- Returns:
- A new instance. Never
null .
-
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
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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-