Package javax.mail.event
Class FolderEvent
- java.lang.Object
-
- java.util.EventObject
-
- javax.mail.event.MailEvent
-
- javax.mail.event.FolderEvent
-
- All Implemented Interfaces:
java.io.Serializable
public class FolderEvent extends MailEvent
A folder event.- Version:
- 1.4
- Author:
- Chris Burdess
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
CREATED
The folder was created.static int
DELETED
The folder was deleted.protected Folder
folder
The folder the event occurred on.protected Folder
newFolder
The folder representing the new name, in the case of a RENAMED event.static int
RENAMED
The folder was renamed.protected int
type
The event type.
-
Constructor Summary
Constructors Constructor Description FolderEvent(java.lang.Object source, Folder folder, int type)
Constructor.FolderEvent(java.lang.Object source, Folder oldFolder, Folder newFolder, int type)
Constructor for RENAMED events.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispatch(java.lang.Object listener)
Invokes the appropriate listener method.Folder
getFolder()
Returns the affected folder.Folder
getNewFolder()
Returns the folder representing the new name, in the case of a RENAMED event.int
getType()
Returns the type of this event.
-
-
-
Field Detail
-
CREATED
public static final int CREATED
The folder was created.- See Also:
- Constant Field Values
-
DELETED
public static final int DELETED
The folder was deleted.- See Also:
- Constant Field Values
-
RENAMED
public static final int RENAMED
The folder was renamed.- See Also:
- Constant Field Values
-
type
protected int type
The event type.
-
folder
protected transient Folder folder
The folder the event occurred on.
-
newFolder
protected transient Folder newFolder
The folder representing the new name, in the case of a RENAMED event.
-
-
Constructor Detail
-
FolderEvent
public FolderEvent(java.lang.Object source, Folder folder, int type)
Constructor.- Parameters:
source
- the sourcefolder
- the affected foldertype
- the event type (CREATED or DELETED)
-
-
Method Detail
-
getType
public int getType()
Returns the type of this event.
-
getFolder
public Folder getFolder()
Returns the affected folder.- See Also:
getNewFolder()
-
getNewFolder
public Folder getNewFolder()
Returns the folder representing the new name, in the case of a RENAMED event.- See Also:
getFolder()
-
-