Class AbstractSession.UploadSourceWrapper

java.lang.Object
net.sf.basedb.opengrid.AbstractSession.UploadSourceWrapper
All Implemented Interfaces:
net.schmizz.sshj.xfer.LocalSourceFile
Enclosing class:
AbstractSession<T extends AbstractHost<?>>

static class AbstractSession.UploadSourceWrapper extends Object implements net.schmizz.sshj.xfer.LocalSourceFile
Wraps an UploadSource implementation with a LocalSourceFile implementation so that the file data can be sent to the remote server with SSHj. We do it this way so we don't have to expose SSHj-specific classes to the other extensions.
Since:
1.0
  • Field Details

  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface net.schmizz.sshj.xfer.LocalSourceFile
    • getLength

      public long getLength()
      Specified by:
      getLength in interface net.schmizz.sshj.xfer.LocalSourceFile
    • getInputStream

      public InputStream getInputStream() throws IOException
      Specified by:
      getInputStream in interface net.schmizz.sshj.xfer.LocalSourceFile
      Throws:
      IOException
    • getPermissions

      public int getPermissions()
      Specified by:
      getPermissions in interface net.schmizz.sshj.xfer.LocalSourceFile
    • isFile

      public boolean isFile()
      We only support files.
      Specified by:
      isFile in interface net.schmizz.sshj.xfer.LocalSourceFile
    • isDirectory

      public boolean isDirectory()
      Specified by:
      isDirectory in interface net.schmizz.sshj.xfer.LocalSourceFile
    • getChildren

      public Iterable<? extends net.schmizz.sshj.xfer.LocalSourceFile> getChildren(net.schmizz.sshj.xfer.LocalFileFilter filter) throws IOException
      No children.
      Specified by:
      getChildren in interface net.schmizz.sshj.xfer.LocalSourceFile
      Throws:
      IOException
    • providesAtimeMtime

      public boolean providesAtimeMtime()
      Specified by:
      providesAtimeMtime in interface net.schmizz.sshj.xfer.LocalSourceFile
    • getLastAccessTime

      public long getLastAccessTime() throws IOException
      Specified by:
      getLastAccessTime in interface net.schmizz.sshj.xfer.LocalSourceFile
      Throws:
      IOException
    • getLastModifiedTime

      public long getLastModifiedTime() throws IOException
      Specified by:
      getLastModifiedTime in interface net.schmizz.sshj.xfer.LocalSourceFile
      Throws:
      IOException