javax.mail.event
Class FolderEvent
A folder event.
Version:
- Chris Burdess
static int | CREATED - The folder was created.
|
static int | DELETED - The folder was deleted.
|
static int | RENAMED - The folder was renamed.
|
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.
|
protected int | type - The event type.
|
void | dispatch(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.
|
CREATED
public static final int CREATED
The folder was created.
- 1
DELETED
public static final int DELETED
The folder was deleted.
- 2
RENAMED
public static final int RENAMED
The folder was renamed.
- 3
folder
protected Folder folder
The folder the event occurred on.
newFolder
protected Folder newFolder
The folder representing the new name, in the case of a RENAMED event.
type
protected int type
The event type.
FolderEvent
public FolderEvent(Object source,
Folder folder,
int type)
Constructor.
source
- the sourcefolder
- the affected foldertype
- the event type (CREATED or DELETED)
FolderEvent
public FolderEvent(Object source,
Folder oldFolder,
Folder newFolder,
int type)
Constructor for RENAMED events.
source
- the sourceoldFolder
- the folder that is renamednewFolder
- the folder that represents the new nametype
- the event type (RENAMED)
dispatch
public void dispatch(Object listener)
Invokes the appropriate listener method.
- dispatch in interface MailEvent
getNewFolder
public Folder getNewFolder()
Returns the folder representing the new name, in the case of a RENAMED
event.
getFolder()
getType
public int getType()
Returns the type of this event.
© Copyright 2003, 2004
The Free Software Foundation, All rights reserved