Package net.sf.basedb.opengrid
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 Summary
Modifier and TypeFieldDescriptionprivate final FileMetaData
private final FilePermission
private final UploadSource
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionIterable<? extends net.schmizz.sshj.xfer.LocalSourceFile>
getChildren
(net.schmizz.sshj.xfer.LocalFileFilter filter) No children.long
long
long
getName()
int
boolean
boolean
isFile()
We only support files.boolean
-
Field Details
-
source
-
metadata
-
permission
-
-
Constructor Details
-
UploadSourceWrapper
UploadSourceWrapper(UploadSource source, FilePermission permission)
-
-
Method Details
-
getName
- Specified by:
getName
in interfacenet.schmizz.sshj.xfer.LocalSourceFile
-
getLength
public long getLength()- Specified by:
getLength
in interfacenet.schmizz.sshj.xfer.LocalSourceFile
-
getInputStream
- Specified by:
getInputStream
in interfacenet.schmizz.sshj.xfer.LocalSourceFile
- Throws:
IOException
-
getPermissions
public int getPermissions()- Specified by:
getPermissions
in interfacenet.schmizz.sshj.xfer.LocalSourceFile
-
isFile
public boolean isFile()We only support files.- Specified by:
isFile
in interfacenet.schmizz.sshj.xfer.LocalSourceFile
-
isDirectory
public boolean isDirectory()- Specified by:
isDirectory
in interfacenet.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 interfacenet.schmizz.sshj.xfer.LocalSourceFile
- Throws:
IOException
-
providesAtimeMtime
public boolean providesAtimeMtime()- Specified by:
providesAtimeMtime
in interfacenet.schmizz.sshj.xfer.LocalSourceFile
-
getLastAccessTime
- Specified by:
getLastAccessTime
in interfacenet.schmizz.sshj.xfer.LocalSourceFile
- Throws:
IOException
-
getLastModifiedTime
- Specified by:
getLastModifiedTime
in interfacenet.schmizz.sshj.xfer.LocalSourceFile
- Throws:
IOException
-