class CopyListing extends Configured {

  public static CopyListing getCopyListing(
      Configuration configuration,
      Credentials credentials,
      S3MapReduceCpOptions options)
    throws IOException {

    String copyListingClassName = configuration.get(S3MapReduceCpConstants.CONF_LABEL_COPY_LISTING_CLASS, "");
    Class<? extends CopyListing> copyListingClass;
    try {
      if (!copyListingClassName.isEmpty()) {
        copyListingClass = configuration
            .getClass(S3MapReduceCpConstants.CONF_LABEL_COPY_LISTING_CLASS, SimpleCopyListing.class, CopyListing.class);
      } else {
        copyListingClass = SimpleCopyListing.class;
      }
      copyListingClassName = copyListingClass.getName();
      Constructor<? extends CopyListing> constructor = copyListingClass
          .getDeclaredConstructor(Configuration.class, Credentials.class);
      return constructor.newInstance(configuration, credentials);
    } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException
        | IllegalArgumentException | InvocationTargetException e) {
      throw new IOException("Unable to instantiate " + copyListingClassName, e);
    }
  }

  protected  CopyListing(Configuration configuration, Credentials credentials);

}