JML

net.sf.jml
Interface MsnFileTransfer

All Known Implementing Classes:
AbstractFileTransfer

public interface MsnFileTransfer

Msn file transfer.

Author:
Roger Chen

Method Summary
 void cancel()
          Cancel transfer.
 MsnContact getContact()
          Get the contact who sent the file or received the file.
 File getFile()
          Get the transfer file.
 long getFileTotalSize()
          Get the total size of the file.
 MsnMessenger getMessenger()
          Get the MsnMessenger the controller belongs to.
 MsnFileTransferState getState()
          Get file transfer state.
 MsnSwitchboard getSwitchboard()
          Get the MsnSwitchboard the controller belongs to.
 long getTransferredSize()
          Get transferred size.
 boolean isReceiver()
          Is the MsnOwner receive file from others.
 boolean isSender()
          Is the MsnOwner send file to others.
 boolean isStarted()
          Is started.
 void setFile(File file)
          Set the transfer file only if the transfer controller not started.
 void start()
          Start transfer.
 

Method Detail

getSwitchboard

MsnSwitchboard getSwitchboard()
Get the MsnSwitchboard the controller belongs to.

Returns:
MsnSwitchboard

getMessenger

MsnMessenger getMessenger()
Get the MsnMessenger the controller belongs to.

Returns:
MsnMessenger

getContact

MsnContact getContact()
Get the contact who sent the file or received the file.

Returns:
the contact

getState

MsnFileTransferState getState()
Get file transfer state.

Returns:
file transfer state

getFile

File getFile()
Get the transfer file.

Returns:
transfer file

setFile

void setFile(File file)
             throws IllegalStateException
Set the transfer file only if the transfer controller not started.

Parameters:
file - transfer file
Throws:
IllegalStateException - if the transfer started

getFileTotalSize

long getFileTotalSize()
Get the total size of the file.

Returns:
the file total size

getTransferredSize

long getTransferredSize()
Get transferred size.

Returns:
the transferred size

isStarted

boolean isStarted()
Is started.

Returns:
is started

start

void start()
Start transfer.


cancel

void cancel()
Cancel transfer.


isSender

boolean isSender()
Is the MsnOwner send file to others.

Returns:
is the MsnOwner send file to others

isReceiver

boolean isReceiver()
Is the MsnOwner receive file from others.

Returns:
is the MsnOwner receive file from others

JML