Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol.event
Class FileTransferStatusChangeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by net.java.sip.communicator.service.protocol.event.FileTransferStatusChangeEvent
All Implemented Interfaces:
Serializable

public class FileTransferStatusChangeEvent
extends EventObject

The FileTransferStatusChangeEvent is the event indicating of a change in the state of a file transfer.

Author:
Yana Stamcheva
See Also:
Serialized Form

Field Summary
static int CANCELED
          Indicates that the file transfer has been canceled.
static int COMPLETED
          Indicates that the file transfer has been completed.
static int FAILED
          Indicates that the file transfer has failed.
static int IN_PROGRESS
          Indicates that the file transfer is in progress.
static int PREPARING
          Indicates that the file transfer is in negotiation.
static int REFUSED
          Indicates that the file transfer has been refused.
static int WAITING
          Indicates that the file transfer waits for the recipient to accept the file.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
FileTransferStatusChangeEvent(FileTransfer fileTransfer, int oldStatus, int newStatus, String reason)
          Creates a FileTransferStatusChangeEvent by specifying the source fileTransfer, the old transfer status and the new status.
 
Method Summary
 FileTransfer getFileTransfer()
          Returns the source FileTransfer that triggered this event.
 int getNewStatus()
          The new state of the file transfer.
 int getOldStatus()
          Returns the state of the file transfer before this event occured.
 String getReason()
          Returns the reason of the status change.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COMPLETED

public static final int COMPLETED
Indicates that the file transfer has been completed.

See Also:
Constant Field Values

CANCELED

public static final int CANCELED
Indicates that the file transfer has been canceled.

See Also:
Constant Field Values

FAILED

public static final int FAILED
Indicates that the file transfer has failed.

See Also:
Constant Field Values

REFUSED

public static final int REFUSED
Indicates that the file transfer has been refused.

See Also:
Constant Field Values

IN_PROGRESS

public static final int IN_PROGRESS
Indicates that the file transfer is in progress.

See Also:
Constant Field Values

WAITING

public static final int WAITING
Indicates that the file transfer waits for the recipient to accept the file.

See Also:
Constant Field Values

PREPARING

public static final int PREPARING
Indicates that the file transfer is in negotiation.

See Also:
Constant Field Values
Constructor Detail

FileTransferStatusChangeEvent

public FileTransferStatusChangeEvent(FileTransfer fileTransfer,
                                     int oldStatus,
                                     int newStatus,
                                     String reason)
Creates a FileTransferStatusChangeEvent by specifying the source fileTransfer, the old transfer status and the new status.

Parameters:
fileTransfer - the source file transfer, for which this status change occured
oldStatus - the old status
newStatus - the new status
reason - the reason of this status change
Method Detail

getFileTransfer

public FileTransfer getFileTransfer()
Returns the source FileTransfer that triggered this event.

Returns:
the source FileTransfer that triggered this event

getOldStatus

public int getOldStatus()
Returns the state of the file transfer before this event occured.

Returns:
the old state

getNewStatus

public int getNewStatus()
The new state of the file transfer.

Returns:
the new state

getReason

public String getReason()
Returns the reason of the status change.

Returns:
the reason of the status change

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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