Package com.orbitz.consul.async
Interface ConsulResponseCallback<T>
-
- Type Parameters:
T- The Response type.
public interface ConsulResponseCallback<T>For API calls that support long-polling, this callback is used to handle the result on success or failure for an async HTTP call.
-
-
Method Summary
Modifier and Type Method Description voidonComplete(ConsulResponse<T> consulResponse)Callback for a successfulConsulResponse.voidonFailure(java.lang.Throwable throwable)Callback for an unsuccessful request.
-
-
-
Method Detail
-
onComplete
void onComplete(ConsulResponse<T> consulResponse)
Callback for a successfulConsulResponse.- Parameters:
consulResponse- The Consul response.
-
onFailure
void onFailure(java.lang.Throwable throwable)
Callback for an unsuccessful request.- Parameters:
throwable- The exception thrown.
-
-