Interface JsonRpcClientBatchResponse
- All Superinterfaces:
AutoCloseable, HttpClientResponse, Iterable<JsonRpcClientResponse>
public interface JsonRpcClientBatchResponse
extends Iterable<JsonRpcClientResponse>, HttpClientResponse
A representation for a JSON-RPC batch response.
-
Method Summary
Modifier and TypeMethodDescriptionget(int index) Get a single response by index.headers()Response headers.URI of the last request.default StringProtocol selected by WebClient for this response.intsize()Number of responses in this batch.status()Response status.trailers()Response trailer headers.Methods inherited from interface HttpClientResponse
as, close, entity, inputStream, sourceModifier and TypeMethodDescriptiondefault <T> TRead the entity as a specific type.voidclose()Closes the response.entity()Response entity.default InputStreamEntity input stream.default <T extends Source<?>>
voidsource(GenericType<T> sourceType, T source) Registers a source listener for this response.Methods inherited from interface Iterable
forEach, iterator, spliterator
-
Method Details
-
size
int size()Number of responses in this batch.- Returns:
- the size
-
get
Get a single response by index.- Parameters:
index- the index- Returns:
- the response
- Throws:
IndexOutOfBoundsException- if index is out of bounds
-
protocolId
Protocol selected by WebClient for this response.The default implementation returns
http/1.1.- Returns:
- protocol identifier, such as
http/1.1,h2, orh3
-
status
-
headers
-
trailers
ClientResponseTrailers trailers()Response trailer headers. Blocks until trailers are available.- Returns:
- trailers
- Throws:
IllegalStateException- when invoked before entity is requested
-
lastEndpointUri
-