Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.ssh
Class OperationSetFileTransferSSHImpl

java.lang.Object
  extended by net.java.sip.communicator.impl.protocol.ssh.OperationSetFileTransferSSHImpl
All Implemented Interfaces:
OperationSet, OperationSetFileTransfer

public class OperationSetFileTransferSSHImpl
extends Object
implements OperationSetFileTransfer

This class provides operations to upload/download files to remote machines

Author:
Shobhit Jindal

Constructor Summary
OperationSetFileTransferSSHImpl(ProtocolProviderServiceSSHImpl parentProvider)
          Creates a new instance of OperationSetFileTransferSSHImpl
 
Method Summary
 void addFileTransferListener(FileTransferListener listener)
          Registers a FileTransferListener with this operation set so that it gets notifications of start, complete, failure of file transfers
 long getMaximumFileLength()
          Returns the maximum file length supported by the protocol in bytes.
 void removeFileTransferListener(FileTransferListener listener)
          Removes the given FileTransferListener that listens for file transfer requests and created file transfers.
 FileTransfer sendFile(Contact toContact, Contact fromContact, String remotePath, String localPath)
          The file transfer method to/from the remote machine either toContact is null(we are downloading file from remote machine or fromContact is null(we are uploading file to remote machine
 FileTransfer sendFile(Contact toContact, File file)
          Sends a file transfer request to the given toContact.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationSetFileTransferSSHImpl

public OperationSetFileTransferSSHImpl(ProtocolProviderServiceSSHImpl parentProvider)
Creates a new instance of OperationSetFileTransferSSHImpl

Parameters:
parentProvider - the parent protocol provider service
Method Detail

addFileTransferListener

public void addFileTransferListener(FileTransferListener listener)
Registers a FileTransferListener with this operation set so that it gets notifications of start, complete, failure of file transfers

Specified by:
addFileTransferListener in interface OperationSetFileTransfer
Parameters:
listener - the FileListener to register.

removeFileTransferListener

public void removeFileTransferListener(FileTransferListener listener)
Description copied from interface: OperationSetFileTransfer
Removes the given FileTransferListener that listens for file transfer requests and created file transfers.

Specified by:
removeFileTransferListener in interface OperationSetFileTransfer
Parameters:
listener - the FileTransferListener to remove

sendFile

public FileTransfer sendFile(Contact toContact,
                             File file)
Sends a file transfer request to the given toContact.

Specified by:
sendFile in interface OperationSetFileTransfer
Parameters:
toContact - the contact that should receive the file
file - the file to send
Returns:
the transfer object

sendFile

public FileTransfer sendFile(Contact toContact,
                             Contact fromContact,
                             String remotePath,
                             String localPath)
The file transfer method to/from the remote machine either toContact is null(we are downloading file from remote machine or fromContact is null(we are uploading file to remote machine

Specified by:
sendFile in interface OperationSetFileTransfer
Parameters:
toContact - - the file recipient
fromContact - - the file sender
remotePath - - the identifier for the remote file
localPath - - the identifier for the local file
Returns:
the transfer object

getMaximumFileLength

public long getMaximumFileLength()
Returns the maximum file length supported by the protocol in bytes.

Specified by:
getMaximumFileLength in interface OperationSetFileTransfer
Returns:
the file length that is supported.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.