com.echomine.net
Class FileEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.echomine.net.FileEvent
All Implemented Interfaces:
java.io.Serializable

public class FileEvent
extends java.util.EventObject

Contains event information regarding a file activity. There are convenience methods added for easier retrieval of certain basic information such as filename and filesize. The other detailed information will need to be extracted from the source/model itself.

See Also:
Serialized Form

Field Summary
static int FILEINFO_CHANGED
           
static int FILESIZE_CHANGED
           
static int TRANSFER_CANCELLED
           
static int TRANSFER_ERRORED
           
static int TRANSFER_FINISHED
           
static int TRANSFER_QUEUED
           
static int TRANSFER_STARTING
           
static int TRANSFER_VETOED
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
FileEvent(FileHandler handler, FileModel fmodel, int status)
           
FileEvent(FileHandler handler, FileModel fmodel, int status, java.lang.String errormsg)
           
 
Method Summary
 java.lang.String getErrorMessage()
           
 FileHandler getFileHandler()
           
 FileModel getFileModel()
           
 java.lang.String getFilename()
           
 long getFilesize()
           
 java.lang.String getSaveLocation()
           
 int getStatus()
          obtains the status of the file event
 
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

FILESIZE_CHANGED

public static final int FILESIZE_CHANGED
See Also:
Constant Field Values

FILEINFO_CHANGED

public static final int FILEINFO_CHANGED
See Also:
Constant Field Values

TRANSFER_STARTING

public static final int TRANSFER_STARTING
See Also:
Constant Field Values

TRANSFER_FINISHED

public static final int TRANSFER_FINISHED
See Also:
Constant Field Values

TRANSFER_ERRORED

public static final int TRANSFER_ERRORED
See Also:
Constant Field Values

TRANSFER_CANCELLED

public static final int TRANSFER_CANCELLED
See Also:
Constant Field Values

TRANSFER_VETOED

public static final int TRANSFER_VETOED
See Also:
Constant Field Values

TRANSFER_QUEUED

public static final int TRANSFER_QUEUED
See Also:
Constant Field Values
Constructor Detail

FileEvent

public FileEvent(FileHandler handler,
                 FileModel fmodel,
                 int status)

FileEvent

public FileEvent(FileHandler handler,
                 FileModel fmodel,
                 int status,
                 java.lang.String errormsg)
Method Detail

getFileHandler

public FileHandler getFileHandler()
Returns:
the file handler

getFileModel

public FileModel getFileModel()
Returns:
the file model

getFilename

public java.lang.String getFilename()
Returns:
the filename stored in the file model

getFilesize

public long getFilesize()
Returns:
the filesize stored in the file model

getSaveLocation

public java.lang.String getSaveLocation()
Returns:
the save location stored in the file model

getStatus

public int getStatus()
obtains the status of the file event

Returns:
the file event status, as provided in this class

getErrorMessage

public java.lang.String getErrorMessage()
Returns:
the error message, null if there is none


Copyright © 2001-2005 Echomine. All Rights Reserved.