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

apoc.util.SupportedProtocols Maven / Gradle / Ivy

There is a newer version: 5.25.1
Show newest version
package apoc.util;

public enum SupportedProtocols
{
    http(true, null),
    https(true, null),
    ftp(true, null),
    s3(Util.classExists("com.amazonaws.services.s3.AmazonS3"),
       "apoc.util.s3.S3UrlStreamHandlerFactory"),
    gs(Util.classExists("com.google.cloud.storage.Storage"),
       "apoc.util.google.cloud.GCStorageURLStreamHandlerFactory"),
    hdfs(Util.classExists("org.apache.hadoop.fs.FileSystem"),
         "org.apache.hadoop.fs.FsUrlStreamHandlerFactory"),
    file(true, null);

    private final boolean enabled;

    private final String urlStreamHandlerClassName;

    SupportedProtocols(boolean enabled, String urlStreamHandlerClassName) {
        this.enabled = enabled;
        this.urlStreamHandlerClassName = urlStreamHandlerClassName;
        }

    public boolean isEnabled() {
        return enabled;
    }

    String getUrlStreamHandlerClassName() {
        return urlStreamHandlerClassName;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy