A reactive wrapper over Jetty's HttpClient Response.
A ReactiveResponse is available as soon as the response headers arrived
to the client. The response content is processed by a response content
function specified in ReactiveRequest#response(BiFunction).
| Modifier and Type | Class and Description |
|---|---|
| public static class | ReactiveResponse.Content
Collects utility methods to process response content. |
| public static class | |
| public static record | ReactiveResponse.Result<
the type of the response content T>A record holding the |
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private String | |
| private final ReactiveRequest | |
| private final Response |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public HttpFields | |
| public String | |
| public ReactiveRequest | |
| public Response | |
| public int | |
| private void | |
| public String |
| encoding | back to summary |
|---|---|
| private String encoding | |
| mediaType | back to summary |
|---|---|
| private String mediaType | |
| request | back to summary |
|---|---|
| private final ReactiveRequest request | |
| response | back to summary |
|---|---|
| private final Response response | |
| ReactiveResponse | back to summary |
|---|---|
| public ReactiveResponse(ReactiveRequest request, Response response) | |
| getEncoding | back to summary |
|---|---|
public String getEncoding()
| |
| getHeaders | back to summary |
|---|---|
public HttpFields getHeaders()
| |
| getMediaType | back to summary |
|---|---|
public String getMediaType()
| |
| getReactiveRequest | back to summary |
|---|---|
public ReactiveRequest getReactiveRequest()
| |
| getResponse | back to summary |
|---|---|
public Response getResponse()
| |
| getStatus | back to summary |
|---|---|
public int getStatus()
| |
| resolveContentType | back to summary |
|---|---|
| private void resolveContentType() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static BiFunction | Returns: a response content processing function that converts the content to aByteBuffer
up to 2097152 bytes.
|
| public static BiFunction | Returns: a response content processing function that converts the content to aByteBuffer
up to the specified maximum capacity in bytes.
|
| public static BiFunction | Returns: a response content processing function that converts the content to aByteBuffer
up to 2097152 bytes,
and produces a Result with the ByteBuffer content.
|
| public static BiFunction | Returns: a response content processing function that converts the content to aByteBuffer
up to the specified maximum capacity in bytes,
and produces a Result with the ByteBuffer content.
|
| public static < the type of the content T> BiFunction | Returns: a response content processing function that discards the content and produces aResult with a null content of the given type.
|
| public static BiFunction | Returns: a response content processing function that converts the content to a string up to 2097152 bytes.
|
| public static BiFunction | Returns: a response content processing function that converts the content to a string up to the specified maximum capacity in bytes.
|
| public static BiFunction | Returns: a response content processing function that converts the content to a string up to 2097152 bytes, and produces aResult with the string content.
|
| public static BiFunction | Returns: a response content processing function that converts the content to a string up to the specified maximum capacity in bytes, and produces aResult with the string content.
|
| public static BiFunction |
| Content | back to summary |
|---|---|
| public Content() | |
| asByteBuffer | back to summary |
|---|---|
public static BiFunction
| |
| asByteBuffer | back to summary |
|---|---|
public static BiFunction
| |
| asByteBufferResult | back to summary |
|---|---|
public static BiFunction
| |
| asByteBufferResult | back to summary |
|---|---|
public static BiFunction
| |
| asDiscardResult | back to summary |
|---|---|
public static <T> BiFunction
| |
| asString | back to summary |
|---|---|
public static BiFunction
| |
| asString | back to summary |
|---|---|
public static BiFunction
| |
| asStringResult | back to summary |
|---|---|
public static BiFunction
| |
| asStringResult | back to summary |
|---|---|
public static BiFunction
| |
| discard | back to summary |
|---|---|
public static BiFunction
| |
| Modifier and Type | Class and Description |
|---|---|
| public static enum |
| Modifier and Type | Field and Description |
|---|---|
| private final ByteBuffer | |
| private final Throwable | |
| private final ReactiveResponse | |
| private final ReactiveResponse. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| private | Event(ReactiveResponse.
|
| Modifier and Type | Method and Description |
|---|---|
| public ByteBuffer | |
| public Throwable | |
| public ReactiveResponse | |
| public ReactiveResponse. |
| content | back to summary |
|---|---|
| private final ByteBuffer content | |
| failure | back to summary |
|---|---|
| private final Throwable failure | |
| response | back to summary |
|---|---|
| private final ReactiveResponse response | |
| type | back to summary |
|---|---|
| private final ReactiveResponse. | |
| Event | back to summary |
|---|---|
| public Event(ReactiveResponse. | |
| Event | back to summary |
|---|---|
| public Event(ReactiveResponse. | |
| Event | back to summary |
|---|---|
| public Event(ReactiveResponse. | |
| Event | back to summary |
|---|---|
| private Event(ReactiveResponse. | |
| getContent | back to summary |
|---|---|
public ByteBuffer getContent()
| |
| getFailure | back to summary |
|---|---|
public Throwable getFailure()
| |
| getResponse | back to summary |
|---|---|
public ReactiveResponse getResponse()
| |
| getType | back to summary |
|---|---|
public ReactiveResponse.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final ReactiveResponse. | |
| public static final ReactiveResponse. | |
| public static final ReactiveResponse. | |
| public static final ReactiveResponse. | |
| public static final ReactiveResponse. | |
| public static final ReactiveResponse. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static ReactiveResponse. | |
| public static ReactiveResponse. |
| BEGIN | back to summary |
|---|---|
| public static final ReactiveResponse. | |
| COMPLETE | back to summary |
|---|---|
| public static final ReactiveResponse. | |
| CONTENT | back to summary |
|---|---|
| public static final ReactiveResponse. | |
| FAILURE | back to summary |
|---|---|
| public static final ReactiveResponse. | |
| HEADERS | back to summary |
|---|---|
| public static final ReactiveResponse. | |
| SUCCESS | back to summary |
|---|---|
| public static final ReactiveResponse. | |
| Type | back to summary |
|---|---|
| private Type() | |
| valueOf | back to summary |
|---|---|
| public static ReactiveResponse. | |
| values | back to summary |
|---|---|
| public static ReactiveResponse. | |
A record holding the ReactiveResponse and the response content.
| Modifier and Type | Field and Description |
|---|---|
| private final T | |
| private final ReactiveResponse | response
Record Component accessed by response(). the response |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public T | |
| public final boolean | equals(Object
the reference object with which to compare. o)Implements abstract java. |
| public final int | |
| public ReactiveResponse | |
| public final String | toString()
Implements abstract java. |
| content | back to summary |
|---|---|
| private final T content Record Component accessed by content(). the response content | |
| response | back to summary |
|---|---|
| private final ReactiveResponse response Record Component accessed by response(). the response | |
| Result | back to summary |
|---|---|
| public Result(ReactiveResponse response, T content) | |
| content | back to summary |
|---|---|
| public T content() Record Component getter of content.
| |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of
| |
| response | back to summary |
|---|---|
| public ReactiveResponse response() Record Component getter of response.
| |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.
| |