Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.msn
Class FileTransferImpl

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

public class FileTransferImpl
extends AbstractFileTransfer

The Filetransfer imeplementation for msn.

Author:
Damian Minkov

Field Summary
 
Fields inherited from interface net.java.sip.communicator.service.protocol.FileTransfer
IN, OUT
 
Constructor Summary
FileTransferImpl(net.sf.jml.MsnFileTransfer fileTransfer, Contact contact, File file, int direction)
           
 
Method Summary
 void cancel()
          Cancels this file transfer.
 Contact getContact()
          Returns the contact that we are transfering files with.
 int getDirection()
          The file transfer direction.
 String getID()
          Uniquie ID that is identifying the FileTransfer if the request has been accepted.
 File getLocalFile()
          Returns the file that is transfered.
 long getTransferedBytes()
          Returns the number of bytes already transfered through this file transfer.
 void setTransferedBytes(long transferedBytes)
           
 
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

FileTransferImpl

public FileTransferImpl(net.sf.jml.MsnFileTransfer fileTransfer,
                        Contact contact,
                        File file,
                        int direction)
Method Detail

cancel

public void cancel()
Cancels this file transfer. When this method is called transfer should be interrupted.

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

getTransferedBytes

public long getTransferedBytes()
Returns the number of bytes already transfered through this file transfer.

Specified by:
getTransferedBytes in interface FileTransfer
Specified by:
getTransferedBytes in class AbstractFileTransfer
Returns:
the number of bytes already transfered through this file transfer

getID

public String getID()
Uniquie ID that is identifying the FileTransfer if the request has been accepted.

Returns:
the id.

getDirection

public int getDirection()
The file transfer direction.

Returns:
returns the direction of the file transfer : IN or OUT.

getLocalFile

public File getLocalFile()
Returns the file that is transfered.

Returns:
the file

getContact

public Contact getContact()
Returns the contact that we are transfering files with.

Returns:
the contact.

setTransferedBytes

public void setTransferedBytes(long transferedBytes)
Parameters:
transferedBytes - the transferedBytes to set

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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