All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.rt.storage.auth.RequestMetadataCallback Maven / Gradle / Ivy

package com.rt.storage.auth;

import java.util.List;
import java.util.Map;

/**
 * The callback that receives the result of the asynchronous {@link
 * Credentials#getRequestMetadata(java.net.URI, java.util.concurrent.Executor,
 * RequestMetadataCallback)}. Exactly one method should be called.
 */
public interface RequestMetadataCallback {
  /**
   * Called when metadata is successfully produced.
   *
   * @param metadata Metadata returned for the request.
   */
  void onSuccess(Map> metadata);

  /**
   * Called when metadata generation failed.
   *
   * @param exception The thrown exception which caused the request metadata fetch to fail.
   */
  void onFailure(Throwable exception);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy