@Immutable
public interface CommandRequest<T>
Modifier and Type | Method and Description |
---|---|
T |
execute()
Executes the request and returns the result.
|
com.google.common.util.concurrent.ListenableFuture<SphereResult<T>> |
executeAsync()
Executes the request asynchronously and returns a future providing the result.
|
CommandRequest<T> |
withErrorHandling(com.google.common.base.Function<SphereBackendException,SphereException> transformError)
Transforms a generic error result from the Sphere backend into a specific error, depending on the use case.
|
T execute()
com.google.common.util.concurrent.ListenableFuture<SphereResult<T>> executeAsync()
CommandRequest<T> withErrorHandling(@Nonnull com.google.common.base.Function<SphereBackendException,SphereException> transformError)