Package com.meeshkan.http.types
Class HttpExchange
- java.lang.Object
-
- com.meeshkan.http.types.HttpExchange
-
public final class HttpExchange extends java.lang.Object
HTTP request and response pair.To work with serialization in the HTTP Types format, use use
HttpExchangeReader
andHttpExchangeWriter
.Use
HttpExchange.Builder
to create instances manually.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HttpExchange.Builder
Builder of immutableHttpExchange
instances.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
@NotNull HttpRequest
getRequest()
The HTTP request made in this exchange, which caused the HTTP response returned bygetResponse()
.@NotNull HttpResponse
getResponse()
The HTTP response made in this exchange, caused by the HTTP request returned bygetRequest()
.int
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
getRequest
@NotNull public @NotNull HttpRequest getRequest()
The HTTP request made in this exchange, which caused the HTTP response returned bygetResponse()
.- Returns:
- the request part of this exchange
-
getResponse
@NotNull public @NotNull HttpResponse getResponse()
The HTTP response made in this exchange, caused by the HTTP request returned bygetRequest()
.- Returns:
- the response part of this exchange
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-