Class FTPQueueStorage

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

    public class FTPQueueStorage
    extends java.lang.Object
    implements java.lang.Runnable, de.dytanic.cloudnet.template.ITemplateStorage
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      @Nullable java.io.OutputStream appendOutputStream​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String path)  
      @Nullable java.util.zip.ZipInputStream asZipInputStream​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)  
      void close()  
      boolean copy​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.io.File directory)  
      boolean copy​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.io.File[] directories)  
      boolean copy​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.nio.file.Path directory)  
      boolean copy​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.nio.file.Path[] directories)  
      boolean create​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)  
      boolean createDirectory​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String path)  
      boolean createFile​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String path)  
      boolean delete​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)  
      boolean deleteFile​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String path)  
      boolean deploy​(@org.jetbrains.annotations.NotNull byte[] zipInput, @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate target)
      Deprecated.
      boolean deploy​(@NotNull java.io.File[] files, @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate target)  
      boolean deploy​(@NotNull java.io.File directory, @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate target, @Nullable java.util.function.Predicate<java.io.File> fileFilter)  
      boolean deploy​(@NotNull java.nio.file.Path[] paths, @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate target)  
      boolean deploy​(@NotNull java.util.zip.ZipInputStream inputStream, @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate serviceTemplate)  
      AbstractFTPStorage getExecutingStorage()  
      java.lang.String getName()  
      java.util.Collection<de.dytanic.cloudnet.driver.service.ServiceTemplate> getTemplates()  
      boolean has​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)  
      boolean hasFile​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String path)  
      boolean isOpened()  
      java.lang.String[] listFiles​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String dir)  
      @Nullable java.io.OutputStream newOutputStream​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String path)  
      void run()  
      byte[] toZipByteArray​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)
      Deprecated.
      • 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.template.ITemplateStorage

        deploy, listFiles, shouldSyncInCluster
    • Constructor Detail

    • Method Detail

      • run

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

        @Deprecated
        public boolean deploy​(@NotNull
                              @org.jetbrains.annotations.NotNull byte[] zipInput,
                              @NotNull
                              @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate target)
        Deprecated.
        Specified by:
        deploy in interface de.dytanic.cloudnet.template.ITemplateStorage
      • deploy

        public boolean deploy​(@NotNull
                              @NotNull java.io.File directory,
                              @NotNull
                              @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate target,
                              @Nullable
                              @Nullable java.util.function.Predicate<java.io.File> fileFilter)
        Specified by:
        deploy in interface de.dytanic.cloudnet.template.ITemplateStorage
      • deploy

        public boolean deploy​(@NotNull
                              @NotNull java.util.zip.ZipInputStream inputStream,
                              @NotNull
                              @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate serviceTemplate)
        Specified by:
        deploy in interface de.dytanic.cloudnet.template.ITemplateStorage
      • deploy

        public boolean deploy​(@NotNull
                              @NotNull java.nio.file.Path[] paths,
                              @NotNull
                              @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate target)
        Specified by:
        deploy in interface de.dytanic.cloudnet.template.ITemplateStorage
      • deploy

        public boolean deploy​(@NotNull
                              @NotNull java.io.File[] files,
                              @NotNull
                              @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate target)
        Specified by:
        deploy in interface de.dytanic.cloudnet.template.ITemplateStorage
      • copy

        public boolean copy​(@NotNull
                            @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                            @NotNull
                            @NotNull java.io.File directory)
        Specified by:
        copy in interface de.dytanic.cloudnet.template.ITemplateStorage
      • 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.template.ITemplateStorage
      • copy

        public boolean copy​(@NotNull
                            @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                            @NotNull
                            @NotNull java.io.File[] directories)
        Specified by:
        copy in interface de.dytanic.cloudnet.template.ITemplateStorage
      • copy

        public boolean copy​(@NotNull
                            @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                            @NotNull
                            @NotNull java.nio.file.Path[] directories)
        Specified by:
        copy in interface de.dytanic.cloudnet.template.ITemplateStorage
      • toZipByteArray

        @Deprecated
        public byte[] toZipByteArray​(@NotNull
                                     @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)
        Deprecated.
        Specified by:
        toZipByteArray in interface de.dytanic.cloudnet.template.ITemplateStorage
      • asZipInputStream

        @Nullable
        public @Nullable java.util.zip.ZipInputStream asZipInputStream​(@NotNull
                                                                       @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)
        Specified by:
        asZipInputStream in interface de.dytanic.cloudnet.template.ITemplateStorage
      • delete

        public boolean delete​(@NotNull
                              @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)
        Specified by:
        delete in interface de.dytanic.cloudnet.template.ITemplateStorage
      • create

        public boolean create​(@NotNull
                              @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)
        Specified by:
        create in interface de.dytanic.cloudnet.template.ITemplateStorage
      • has

        public boolean has​(@NotNull
                           @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)
        Specified by:
        has in interface de.dytanic.cloudnet.template.ITemplateStorage
      • appendOutputStream

        @Nullable
        public @Nullable java.io.OutputStream appendOutputStream​(@NotNull
                                                                 @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                                                 @NotNull
                                                                 @NotNull java.lang.String path)
                                                          throws java.io.IOException
        Specified by:
        appendOutputStream in interface de.dytanic.cloudnet.template.ITemplateStorage
        Throws:
        java.io.IOException
      • newOutputStream

        @Nullable
        public @Nullable java.io.OutputStream newOutputStream​(@NotNull
                                                              @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                                              @NotNull
                                                              @NotNull java.lang.String path)
                                                       throws java.io.IOException
        Specified by:
        newOutputStream in interface de.dytanic.cloudnet.template.ITemplateStorage
        Throws:
        java.io.IOException
      • createFile

        public boolean createFile​(@NotNull
                                  @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                  @NotNull
                                  @NotNull java.lang.String path)
                           throws java.io.IOException
        Specified by:
        createFile in interface de.dytanic.cloudnet.template.ITemplateStorage
        Throws:
        java.io.IOException
      • createDirectory

        public boolean createDirectory​(@NotNull
                                       @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                       @NotNull
                                       @NotNull java.lang.String path)
                                throws java.io.IOException
        Specified by:
        createDirectory in interface de.dytanic.cloudnet.template.ITemplateStorage
        Throws:
        java.io.IOException
      • hasFile

        public boolean hasFile​(@NotNull
                               @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                               @NotNull
                               @NotNull java.lang.String path)
                        throws java.io.IOException
        Specified by:
        hasFile in interface de.dytanic.cloudnet.template.ITemplateStorage
        Throws:
        java.io.IOException
      • deleteFile

        public boolean deleteFile​(@NotNull
                                  @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                  @NotNull
                                  @NotNull java.lang.String path)
                           throws java.io.IOException
        Specified by:
        deleteFile in interface de.dytanic.cloudnet.template.ITemplateStorage
        Throws:
        java.io.IOException
      • listFiles

        public java.lang.String[] listFiles​(@NotNull
                                            @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                            @NotNull
                                            @NotNull java.lang.String dir)
                                     throws java.io.IOException
        Specified by:
        listFiles in interface de.dytanic.cloudnet.template.ITemplateStorage
        Throws:
        java.io.IOException
      • getTemplates

        public java.util.Collection<de.dytanic.cloudnet.driver.service.ServiceTemplate> getTemplates()
        Specified by:
        getTemplates in interface de.dytanic.cloudnet.template.ITemplateStorage
      • isOpened

        public boolean isOpened()
      • getName

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

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface de.dytanic.cloudnet.template.ITemplateStorage
        Throws:
        java.io.IOException