Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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

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

public class FileTransferImpl
extends AbstractFileTransfer

The Filetransfer imeplementation for ICQ.

Author:
Damian Minkov

Nested Class Summary
(package private)  class FileTransferImpl.IcqFileTransferEventListener
          Provides support for files sent and received.
 
Field Summary
 
Fields inherited from interface net.java.sip.communicator.service.protocol.FileTransfer
IN, OUT
 
Constructor Summary
FileTransferImpl(net.kano.joustsim.oscar.oscar.service.icbm.ft.FileTransfer fileTransfer, String id, Contact contact, File file, int direction)
           
 
Method Summary
 void cancel()
          Cancels this file transfer.
 Contact getContact()
          Returns the contact that we are transferring 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 local file that is being transferred or to which we transfer.
 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.kano.joustsim.oscar.oscar.service.icbm.ft.FileTransfer fileTransfer,
                        String id,
                        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.

getContact

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

Returns:
the contact.

getLocalFile

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

Returns:
the file

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.