org.apache.oodt.cas.protocol.sftp
Class JschSftpProtocol

java.lang.Object
  extended by org.apache.oodt.cas.protocol.sftp.JschSftpProtocol
All Implemented Interfaces:
Protocol

public class JschSftpProtocol
extends Object
implements Protocol

An implement of an SFTP provider based on Jcraft's JSCH library.

Version:
$Revision$
Author:
bfoster

Constructor Summary
JschSftpProtocol()
           
JschSftpProtocol(int port)
           
 
Method Summary
 void cd(ProtocolFile file)
           
 void cdHome()
           
 void cdRoot()
           
 void close()
           
 void connect(String host, Authentication auth)
           
 boolean connected()
           
 void delete(ProtocolFile file)
           
 void get(ProtocolFile fromFile, File toFile)
           
 List<ProtocolFile> ls()
           
 List<ProtocolFile> ls(ProtocolFileFilter filter)
           
 void put(File fromFile, ProtocolFile toFile)
           
 ProtocolFile pwd()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JschSftpProtocol

public JschSftpProtocol()

JschSftpProtocol

public JschSftpProtocol(int port)
Method Detail

cd

public void cd(ProtocolFile file)
        throws ProtocolException
Specified by:
cd in interface Protocol
Throws:
ProtocolException

cdRoot

public void cdRoot()
            throws ProtocolException
Specified by:
cdRoot in interface Protocol
Throws:
ProtocolException

cdHome

public void cdHome()
            throws ProtocolException
Specified by:
cdHome in interface Protocol
Throws:
ProtocolException

connect

public void connect(String host,
                    Authentication auth)
             throws ProtocolException
Specified by:
connect in interface Protocol
Throws:
ProtocolException

close

public void close()
           throws ProtocolException
Specified by:
close in interface Protocol
Throws:
ProtocolException

get

public void get(ProtocolFile fromFile,
                File toFile)
         throws ProtocolException
Specified by:
get in interface Protocol
Throws:
ProtocolException

put

public void put(File fromFile,
                ProtocolFile toFile)
         throws ProtocolException
Specified by:
put in interface Protocol
Throws:
ProtocolException

ls

public List<ProtocolFile> ls()
                      throws ProtocolException
Specified by:
ls in interface Protocol
Throws:
ProtocolException

ls

public List<ProtocolFile> ls(ProtocolFileFilter filter)
                      throws ProtocolException
Specified by:
ls in interface Protocol
Throws:
ProtocolException

pwd

public ProtocolFile pwd()
                 throws ProtocolException
Specified by:
pwd in interface Protocol
Throws:
ProtocolException

connected

public boolean connected()
Specified by:
connected in interface Protocol

delete

public void delete(ProtocolFile file)
            throws ProtocolException
Specified by:
delete in interface Protocol
Throws:
ProtocolException


Copyright © 1999-2013
Apache OODT. All Rights Reserved.