Class FTPQueueStorage

  • All Implemented Interfaces:
    de.dytanic.cloudnet.common.INameable, de.dytanic.cloudnet.driver.template.TemplateStorage, java.lang.AutoCloseable, java.lang.Runnable

    public class FTPQueueStorage
    extends de.dytanic.cloudnet.driver.template.defaults.DefaultAsyncTemplateStorage
    implements java.lang.Runnable, de.dytanic.cloudnet.driver.template.TemplateStorage
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.io.OutputStream> appendOutputStreamAsync​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String path)  
      void close()  
      @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Void> closeAsync()  
      boolean copy​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.nio.file.Path directory)  
      @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> copyAsync​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.nio.file.Path directory)  
      @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> createAsync​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)  
      @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> createDirectoryAsync​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String path)  
      @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> createFileAsync​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String path)  
      @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> deleteAsync​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)  
      @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> deleteFileAsync​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String path)  
      @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> deployAsync​(@NotNull java.io.InputStream inputStream, @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate target)  
      @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> deployAsync​(@NotNull java.nio.file.Path directory, @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate target, @Nullable java.util.function.Predicate<java.nio.file.Path> fileFilter)  
      AbstractFTPStorage getExecutingStorage()  
      @NotNull de.dytanic.cloudnet.common.concurrent.ITask<de.dytanic.cloudnet.driver.template.FileInfo> getFileInfoAsync​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String path)  
      java.lang.String getName()  
      @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.util.Collection<de.dytanic.cloudnet.driver.service.ServiceTemplate>> getTemplatesAsync()  
      @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> hasAsync​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)  
      @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> hasFileAsync​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String path)  
      boolean isOpened()  
      @NotNull de.dytanic.cloudnet.common.concurrent.ITask<de.dytanic.cloudnet.driver.template.FileInfo[]> listFilesAsync​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String dir, boolean deep)  
      @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.io.InputStream> newInputStreamAsync​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String path)  
      @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.io.OutputStream> newOutputStreamAsync​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String path)  
      void run()  
      @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.io.InputStream> zipTemplateAsync​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)  
      • Methods inherited from class de.dytanic.cloudnet.driver.template.defaults.DefaultAsyncTemplateStorage

        appendOutputStream, asZipInputStream, create, createDirectory, createFile, delete, deleteFile, deploy, deploy, deploy, getFileInfo, getTemplates, has, hasFile, listFiles, listFiles, newInputStream, newOutputStream, zipTemplate
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface de.dytanic.cloudnet.driver.template.TemplateStorage

        appendOutputStream, asZipInputStream, asZipInputStreamAsync, create, createDirectory, createFile, delete, deleteFile, deploy, deploy, deploy, deployAsync, getFileInfo, getTemplates, has, hasFile, listFiles, listFiles, listFiles, listFiles, listFilesAsync, listFilesAsync, listFilesAsync, newInputStream, newOutputStream, zipTemplate
    • Constructor Detail

    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface de.dytanic.cloudnet.driver.template.TemplateStorage
        Overrides:
        close in class de.dytanic.cloudnet.driver.template.defaults.DefaultAsyncTemplateStorage
        Throws:
        java.io.IOException
      • deployAsync

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> deployAsync​(@NotNull
                                                                                                   @NotNull java.nio.file.Path directory,
                                                                                                   @NotNull
                                                                                                   @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate target,
                                                                                                   @Nullable
                                                                                                   @Nullable java.util.function.Predicate<java.nio.file.Path> fileFilter)
        Specified by:
        deployAsync in interface de.dytanic.cloudnet.driver.template.TemplateStorage
      • deployAsync

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> deployAsync​(@NotNull
                                                                                                   @NotNull java.io.InputStream inputStream,
                                                                                                   @NotNull
                                                                                                   @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate target)
        Specified by:
        deployAsync in interface de.dytanic.cloudnet.driver.template.TemplateStorage
      • copyAsync

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> copyAsync​(@NotNull
                                                                                                 @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                                                                                 @NotNull
                                                                                                 @NotNull java.nio.file.Path directory)
        Specified by:
        copyAsync in interface de.dytanic.cloudnet.driver.template.TemplateStorage
      • copy

        public boolean copy​(@NotNull
                            @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                            @NotNull
                            @NotNull java.nio.file.Path directory)
        Specified by:
        copy in interface de.dytanic.cloudnet.driver.template.TemplateStorage
        Overrides:
        copy in class de.dytanic.cloudnet.driver.template.defaults.DefaultAsyncTemplateStorage
      • zipTemplateAsync

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.io.InputStream> zipTemplateAsync​(@NotNull
                                                                                                          @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)
        Specified by:
        zipTemplateAsync in interface de.dytanic.cloudnet.driver.template.TemplateStorage
      • deleteAsync

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> deleteAsync​(@NotNull
                                                                                                   @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)
        Specified by:
        deleteAsync in interface de.dytanic.cloudnet.driver.template.TemplateStorage
      • createAsync

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> createAsync​(@NotNull
                                                                                                   @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)
        Specified by:
        createAsync in interface de.dytanic.cloudnet.driver.template.TemplateStorage
      • hasAsync

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> hasAsync​(@NotNull
                                                                                                @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)
        Specified by:
        hasAsync in interface de.dytanic.cloudnet.driver.template.TemplateStorage
      • appendOutputStreamAsync

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.io.OutputStream> appendOutputStreamAsync​(@NotNull
                                                                                                                  @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                                                                                                  @NotNull
                                                                                                                  @NotNull java.lang.String path)
        Specified by:
        appendOutputStreamAsync in interface de.dytanic.cloudnet.driver.template.TemplateStorage
      • newOutputStreamAsync

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.io.OutputStream> newOutputStreamAsync​(@NotNull
                                                                                                               @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                                                                                               @NotNull
                                                                                                               @NotNull java.lang.String path)
        Specified by:
        newOutputStreamAsync in interface de.dytanic.cloudnet.driver.template.TemplateStorage
      • createFileAsync

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> createFileAsync​(@NotNull
                                                                                                       @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                                                                                       @NotNull
                                                                                                       @NotNull java.lang.String path)
        Specified by:
        createFileAsync in interface de.dytanic.cloudnet.driver.template.TemplateStorage
      • createDirectoryAsync

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> createDirectoryAsync​(@NotNull
                                                                                                            @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                                                                                            @NotNull
                                                                                                            @NotNull java.lang.String path)
        Specified by:
        createDirectoryAsync in interface de.dytanic.cloudnet.driver.template.TemplateStorage
      • hasFileAsync

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> hasFileAsync​(@NotNull
                                                                                                    @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                                                                                    @NotNull
                                                                                                    @NotNull java.lang.String path)
        Specified by:
        hasFileAsync in interface de.dytanic.cloudnet.driver.template.TemplateStorage
      • deleteFileAsync

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> deleteFileAsync​(@NotNull
                                                                                                       @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                                                                                       @NotNull
                                                                                                       @NotNull java.lang.String path)
        Specified by:
        deleteFileAsync in interface de.dytanic.cloudnet.driver.template.TemplateStorage
      • newInputStreamAsync

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.io.InputStream> newInputStreamAsync​(@NotNull
                                                                                                             @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                                                                                             @NotNull
                                                                                                             @NotNull java.lang.String path)
        Specified by:
        newInputStreamAsync in interface de.dytanic.cloudnet.driver.template.TemplateStorage
      • getFileInfoAsync

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<de.dytanic.cloudnet.driver.template.FileInfo> getFileInfoAsync​(@NotNull
                                                                                                                                   @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                                                                                                                   @NotNull
                                                                                                                                   @NotNull java.lang.String path)
        Specified by:
        getFileInfoAsync in interface de.dytanic.cloudnet.driver.template.TemplateStorage
      • listFilesAsync

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<de.dytanic.cloudnet.driver.template.FileInfo[]> listFilesAsync​(@NotNull
                                                                                                                                   @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                                                                                                                   @NotNull
                                                                                                                                   @NotNull java.lang.String dir,
                                                                                                                                   boolean deep)
        Specified by:
        listFilesAsync in interface de.dytanic.cloudnet.driver.template.TemplateStorage
      • getTemplatesAsync

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.util.Collection<de.dytanic.cloudnet.driver.service.ServiceTemplate>> getTemplatesAsync()
        Specified by:
        getTemplatesAsync in interface de.dytanic.cloudnet.driver.template.TemplateStorage
      • closeAsync

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Void> closeAsync()
        Specified by:
        closeAsync in interface de.dytanic.cloudnet.driver.template.TemplateStorage
      • isOpened

        public boolean isOpened()
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface de.dytanic.cloudnet.common.INameable