Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.jabber
Class IncomingFileTransferJabberImpl

java.lang.Object
  extended by net.java.sip.communicator.service.protocol.AbstractFileTransfer
      extended by net.java.sip.communicator.impl.protocol.jabber.IncomingFileTransferJabberImpl
All Implemented Interfaces:
FileTransfer

public class IncomingFileTransferJabberImpl
extends AbstractFileTransfer

The Jabber protocol extension of the AbstractFileTransfer.

Author:
Yana Stamcheva

Field Summary
 
Fields inherited from interface net.java.sip.communicator.service.protocol.FileTransfer
IN, OUT
 
Constructor Summary
IncomingFileTransferJabberImpl(String id, Contact sender, File file, org.jivesoftware.smackx.filetransfer.IncomingFileTransfer jabberTransfer)
          Creates an IncomingFileTransferJabberImpl.
 
Method Summary
 void cancel()
          Cancels the file transfer.
 Contact getContact()
          Returns the sender of the file.
 int getDirection()
          The direction is incoming.
 String getID()
          Returns the identifier of this file transfer.
 File getLocalFile()
          Returns the local file that is being transferred or to which we transfer.
 long getTransferedBytes()
          Returns the number of bytes already received from the recipient.
 
Methods inherited from class net.java.sip.communicator.service.protocol.AbstractFileTransfer
addProgressListener, addStatusListener, fireProgressChangeEvent, fireStatusChangeEvent, fireStatusChangeEvent, getStatus, removeProgressListener, removeStatusListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IncomingFileTransferJabberImpl

public IncomingFileTransferJabberImpl(String id,
                                      Contact sender,
                                      File file,
                                      org.jivesoftware.smackx.filetransfer.IncomingFileTransfer jabberTransfer)
Creates an IncomingFileTransferJabberImpl.

Parameters:
id - the identifier of this transfer
sender - the sender of the file
file - the file
jabberTransfer - the Jabber file transfer object
Method Detail

cancel

public void cancel()
Cancels the file transfer.

Specified by:
cancel in interface FileTransfer
Specified by:
cancel in class AbstractFileTransfer

getTransferedBytes

public long getTransferedBytes()
Returns the number of bytes already received from the recipient.

Specified by:
getTransferedBytes in interface FileTransfer
Specified by:
getTransferedBytes in class AbstractFileTransfer
Returns:
the number of bytes already received from the recipient

getDirection

public int getDirection()
The direction is incoming.

Returns:
IN

getContact

public Contact getContact()
Returns the sender of the file.

Returns:
the sender of the file

getID

public String getID()
Returns the identifier of this file transfer.

Returns:
the identifier of this file transfer

getLocalFile

public File getLocalFile()
Returns the local file that is being transferred or to which we transfer.

Returns:
the file

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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