Interface RequestMetadataCallback (1.3.0)

public interface RequestMetadataCallback

The callback that receives the result of the asynchronous Credentials#getRequestMetadata(java.net.URI, java.util.concurrent.Executor, RequestMetadataCallback). Exactly one method should be called.

Methods

onFailure(Throwable exception)

public abstract void onFailure(Throwable exception)

Called when metadata generation failed.

Parameter
NameDescription
exceptionThrowable

The thrown exception which caused the request metadata fetch to fail.

onSuccess(Map<String,List<String>> metadata)

public abstract void onSuccess(Map<String,List<String>> metadata)

Called when metadata is successfully produced.

Parameter
NameDescription
metadataMap<String,List<String>>

Metadata returned for the request.