javax.mail.event
Class FolderEvent

java.lang.Object
  extended by java.util.EventObject
      extended by javax.mail.event.MailEvent
          extended by javax.mail.event.FolderEvent
All Implemented Interfaces:
Serializable

public class FolderEvent
extends MailEvent

Version:
$Rev: 467553 $ $Date: 2006-10-25 00:01:51 -0400 (Wed, 25 Oct 2006) $
See Also:
Serialized Form

Field Summary
static int CREATED
           
static int DELETED
           
protected  Folder folder
           
protected  Folder newFolder
           
static int RENAMED
           
protected  int type
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
FolderEvent(Object source, Folder oldFolder, Folder newFolder, int type)
          Constructor used for RENAMED events.
FolderEvent(Object source, Folder folder, int type)
          Constructor other events.
 
Method Summary
 void dispatch(Object listener)
           
 Folder getFolder()
          Return the affected folder.
 Folder getNewFolder()
          Return the new folder; only applicable to RENAMED events.
 int getType()
          Return the event type.
 
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

CREATED

public static final int CREATED
See Also:
Constant Field Values

DELETED

public static final int DELETED
See Also:
Constant Field Values

RENAMED

public static final int RENAMED
See Also:
Constant Field Values

folder

protected transient Folder folder

newFolder

protected transient Folder newFolder

type

protected int type
Constructor Detail

FolderEvent

public FolderEvent(Object source,
                   Folder oldFolder,
                   Folder newFolder,
                   int type)
Constructor used for RENAMED events.

Parameters:
source - the source of the event
oldFolder - the folder that was renamed
newFolder - the folder with the new name
type - the event type

FolderEvent

public FolderEvent(Object source,
                   Folder folder,
                   int type)
Constructor other events.

Parameters:
source - the source of the event
folder - the folder affected
type - the event type
Method Detail

dispatch

public void dispatch(Object listener)
Specified by:
dispatch in class MailEvent

getFolder

public Folder getFolder()
Return the affected folder.

Returns:
the affected folder

getNewFolder

public Folder getNewFolder()
Return the new folder; only applicable to RENAMED events.

Returns:
the new folder

getType

public int getType()
Return the event type.

Returns:
the event type


Copyright © 2003-2009 The Apache Software Foundation. All Rights Reserved.