Interface Clients
public interface Clients
Provides functionality for generated code to make both blocking and asynchronous calls without
duplicating logic.
-
Method Summary
Modifier and TypeMethodDescriptiondefault EndpointChannel<T> Tblock(com.google.common.util.concurrent.ListenableFuture<T> future) Similar toFutures.getUnchecked(Future), except with custom handling for conjure exceptions and cancellation on interruption.<T> com.google.common.util.concurrent.ListenableFuture<T> call(Channel channel, Endpoint endpoint, Request request, Deserializer<T> deserializer) Makes a request to the specifiedEndpointand deserializes the response using a provided deserializer.<T> com.google.common.util.concurrent.ListenableFuture<T> call(EndpointChannel channel, Request request, Deserializer<T> deserializer) Makes a request to the specifiedEndpointChanneland deserializes the response using a provided deserializer.default <T> TcallBlocking(EndpointChannel channel, Request request, Deserializer<T> deserializer) Blocking version ofcall(EndpointChannel, Request, Deserializer).
-
Method Details
-
call
<T> com.google.common.util.concurrent.ListenableFuture<T> call(EndpointChannel channel, Request request, Deserializer<T> deserializer) Makes a request to the specifiedEndpointChanneland deserializes the response using a provided deserializer. -
call
<T> com.google.common.util.concurrent.ListenableFuture<T> call(Channel channel, Endpoint endpoint, Request request, Deserializer<T> deserializer) Makes a request to the specifiedEndpointand deserializes the response using a provided deserializer. Deprecated. preferbind(Channel, Endpoint)as this allows pre-computing values to save CPU -
callBlocking
Blocking version ofcall(EndpointChannel, Request, Deserializer). -
bind
-
block
<T> T block(com.google.common.util.concurrent.ListenableFuture<T> future) Similar toFutures.getUnchecked(Future), except with custom handling for conjure exceptions and cancellation on interruption. Deprecated. prefercallBlocking(EndpointChannel, Request, Deserializer)as it makes the blocking explicit.
-