Share via


PrimitiveRequest<T> Class

Type Parameters

T

the primitive type to deserialize the response to

public class PrimitiveRequest<T>
extends BaseRequest<T>

The class for the Primitive Request.

Constructor Summary

Constructor Description
PrimitiveRequest(String requestUrl, IBaseClient<?> client, List<? extends Option> requestOptions, Class<T> primitiveTypeClass)

The request for the primitive type

Method Summary

Modifier and Type Method and Description
T get()

Gets the primitive information from the service

java.util.concurrent.CompletableFuture<T> getAsync()

Gets the primitive information from the service

Methods inherited from BaseRequest

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

PrimitiveRequest

public PrimitiveRequest(String requestUrl, IBaseClient client, List requestOptions, Class primitiveTypeClass)

The request for the primitive type

Parameters:

requestUrl - the request URL
client - the service client
requestOptions - the options for this request
primitiveTypeClass - the return type class for the request

Method Details

get

public T get()

Gets the primitive information from the service

Returns:

the primitive information from the request

Throws:

ClientException - this exception occurs if the request was unable to complete for any reason

getAsync

public CompletableFuture getAsync()

Gets the primitive information from the service

Returns:

a future with the result

Applies to