javax.mail.event

Class FolderEvent


public class FolderEvent
extends MailEvent

Field Summary

static int
CREATED
static int
DELETED
static int
RENAMED
protected Folder
folder
protected Folder
newFolder
protected int
type

Constructor Summary

FolderEvent(Object source, Folder folder, int type)
Constructor other events.
FolderEvent(Object source, Folder oldFolder, Folder newFolder, int type)
Constructor used for RENAMED 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 javax.mail.event.MailEvent

dispatch

Field Details

CREATED

public static final int CREATED
Field Value:
1

DELETED

public static final int DELETED
Field Value:
2

RENAMED

public static final int RENAMED
Field Value:
3

folder

protected Folder folder

newFolder

protected Folder newFolder

type

protected int type

Constructor Details

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

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

Method Details

dispatch

public void dispatch(Object listener)
Overrides:
dispatch in interface 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