Class S3FileSystemInfo

  • Direct Known Subclasses:
    S3XFileSystemInfo

    public class S3FileSystemInfo
    extends java.lang.Object
    Populates fields with information extracted by the S3 URI provided. This implementation is for standard AWS buckets as described in section "Accessing a bucket using S3://" here
    It also computes the file system key that can be used to identify a runtime instance of a S3FileSystem (for caching purposes for example). In this implementation the key is the bucket name (which is unique in the AWS S3 namespace).
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String accessKey  
      protected java.lang.String accessSecret  
      protected java.lang.String bucket  
      protected java.lang.String endpoint  
      protected java.lang.String key  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected S3FileSystemInfo()  
        S3FileSystemInfo​(java.net.URI uri)
      Creates a new instance and populates it with key and bucket.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String accessKey()  
      java.lang.String accessSecret()  
      java.lang.String bucket()  
      java.lang.String endpoint()  
      java.lang.String key()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • key

        protected java.lang.String key
      • endpoint

        protected java.lang.String endpoint
      • bucket

        protected java.lang.String bucket
      • accessKey

        protected java.lang.String accessKey
      • accessSecret

        protected java.lang.String accessSecret
    • Constructor Detail

      • S3FileSystemInfo

        protected S3FileSystemInfo()
      • S3FileSystemInfo

        public S3FileSystemInfo​(java.net.URI uri)
                         throws java.lang.IllegalArgumentException
        Creates a new instance and populates it with key and bucket. The name of the bucket must follow AWS S3 bucket naming rules)
        Parameters:
        uri - a S3 URI
        Throws:
        java.lang.IllegalArgumentException - if URI contains invalid components (e.g. an invalid bucket name)
    • Method Detail

      • key

        public java.lang.String key()
      • endpoint

        public java.lang.String endpoint()
      • bucket

        public java.lang.String bucket()
      • accessKey

        public java.lang.String accessKey()
      • accessSecret

        public java.lang.String accessSecret()