java.lang.Object
org.springframework.integration.aws.support.S3Session
All Implemented Interfaces:
Closeable, AutoCloseable, org.springframework.integration.file.remote.session.Session<software.amazon.awssdk.services.s3.model.S3Object>

public class S3Session extends Object implements org.springframework.integration.file.remote.session.Session<software.amazon.awssdk.services.s3.model.S3Object>
An Amazon S3 Session implementation.
Author:
Artem Bilan, Jim Krygowski, Anwar Chirakkattil, Xavier François, Rogerio Lino
  • Constructor Details

    • S3Session

      public S3Session(software.amazon.awssdk.services.s3.S3Client amazonS3)
  • Method Details

    • setEndpoint

      public void setEndpoint(String endpoint)
    • list

      public software.amazon.awssdk.services.s3.model.S3Object[] list(String path)
      Specified by:
      list in interface org.springframework.integration.file.remote.session.Session<software.amazon.awssdk.services.s3.model.S3Object>
    • listNames

      public String[] listNames(String path)
      Specified by:
      listNames in interface org.springframework.integration.file.remote.session.Session<software.amazon.awssdk.services.s3.model.S3Object>
    • remove

      public boolean remove(String path)
      Specified by:
      remove in interface org.springframework.integration.file.remote.session.Session<software.amazon.awssdk.services.s3.model.S3Object>
    • rename

      public void rename(String pathFrom, String pathTo)
      Specified by:
      rename in interface org.springframework.integration.file.remote.session.Session<software.amazon.awssdk.services.s3.model.S3Object>
    • read

      public void read(String source, OutputStream outputStream) throws IOException
      Specified by:
      read in interface org.springframework.integration.file.remote.session.Session<software.amazon.awssdk.services.s3.model.S3Object>
      Throws:
      IOException
    • write

      public void write(InputStream inputStream, String destination)
      Specified by:
      write in interface org.springframework.integration.file.remote.session.Session<software.amazon.awssdk.services.s3.model.S3Object>
    • append

      public void append(InputStream inputStream, String destination)
      Specified by:
      append in interface org.springframework.integration.file.remote.session.Session<software.amazon.awssdk.services.s3.model.S3Object>
    • mkdir

      public boolean mkdir(String directory)
      Specified by:
      mkdir in interface org.springframework.integration.file.remote.session.Session<software.amazon.awssdk.services.s3.model.S3Object>
    • rmdir

      public boolean rmdir(String directory)
      Specified by:
      rmdir in interface org.springframework.integration.file.remote.session.Session<software.amazon.awssdk.services.s3.model.S3Object>
    • exists

      public boolean exists(String path)
      Specified by:
      exists in interface org.springframework.integration.file.remote.session.Session<software.amazon.awssdk.services.s3.model.S3Object>
    • readRaw

      public InputStream readRaw(String source)
      Specified by:
      readRaw in interface org.springframework.integration.file.remote.session.Session<software.amazon.awssdk.services.s3.model.S3Object>
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface org.springframework.integration.file.remote.session.Session<software.amazon.awssdk.services.s3.model.S3Object>
    • isOpen

      public boolean isOpen()
      Specified by:
      isOpen in interface org.springframework.integration.file.remote.session.Session<software.amazon.awssdk.services.s3.model.S3Object>
    • finalizeRaw

      public boolean finalizeRaw()
      Specified by:
      finalizeRaw in interface org.springframework.integration.file.remote.session.Session<software.amazon.awssdk.services.s3.model.S3Object>
    • getClientInstance

      public Object getClientInstance()
      Specified by:
      getClientInstance in interface org.springframework.integration.file.remote.session.Session<software.amazon.awssdk.services.s3.model.S3Object>
    • getHostPort

      public String getHostPort()
      Specified by:
      getHostPort in interface org.springframework.integration.file.remote.session.Session<software.amazon.awssdk.services.s3.model.S3Object>
    • normalizeBucketName

      public String normalizeBucketName(String path)