@ParametersAreNonnullByDefault @Generated(value={"Immutables.generator","HttpExchangeIF"}) @Immutable public final class HttpExchange extends Object implements HttpExchangeIF
HttpExchangeIF.
Use the builder to create immutable instances:
HttpExchange.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
HttpExchange.Builder
Builds instances of type
HttpExchange. |
| Modifier and Type | Method and Description |
|---|---|
static HttpExchange.Builder |
builder()
Creates a builder for
HttpExchange. |
static HttpExchange |
copyOf(HttpExchangeIF instance)
Creates an immutable copy of a
HttpExchangeIF value. |
boolean |
equals(Object another)
This instance is equal to all instances of
HttpExchange that have equal attribute values. |
Duration |
getExchangeDuration() |
com.hubspot.horizon.HttpRequest |
getRequest() |
com.hubspot.horizon.HttpResponse |
getResponse() |
int |
hashCode()
Computes a hash code from attributes:
request, response, exchangeDuration. |
String |
toString()
Prints the immutable value
HttpExchange with attribute values. |
HttpExchange |
withExchangeDuration(Duration exchangeDuration)
Copy the current immutable object by setting a value for the
exchangeDuration attribute. |
HttpExchange |
withRequest(com.hubspot.horizon.HttpRequest request)
Copy the current immutable object by setting a value for the
request attribute. |
HttpExchange |
withResponse(com.hubspot.horizon.HttpResponse response)
Copy the current immutable object by setting a value for the
response attribute. |
public com.hubspot.horizon.HttpRequest getRequest()
getRequest in interface HttpExchangeIFrequest attributepublic com.hubspot.horizon.HttpResponse getResponse()
getResponse in interface HttpExchangeIFresponse attributepublic Duration getExchangeDuration()
getExchangeDuration in interface HttpExchangeIFexchangeDuration attributepublic final HttpExchange withRequest(com.hubspot.horizon.HttpRequest request)
request attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.request - A new value for requestthis objectpublic final HttpExchange withResponse(com.hubspot.horizon.HttpResponse response)
response attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.response - A new value for responsethis objectpublic final HttpExchange withExchangeDuration(Duration exchangeDuration)
exchangeDuration attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.exchangeDuration - A new value for exchangeDurationthis objectpublic boolean equals(@Nullable Object another)
HttpExchange that have equal attribute values.public int hashCode()
request, response, exchangeDuration.public String toString()
HttpExchange with attribute values.public static HttpExchange copyOf(HttpExchangeIF instance)
HttpExchangeIF value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static HttpExchange.Builder builder()
HttpExchange.Copyright © 2020. All rights reserved.