Service providers vary widely in their ability to notify clients of these events. At a minimum, service providers must notify listeners registered on the same Store or Folder object on which the operation occurs. Service providers may also notify listeners when changes are made through operations on other objects in the same virtual machine, or by other clients in the same or other hosts. Such notifications are not required and are typically not supported by mail protocols (including IMAP).
| Modifier and Type | Field and Description |
|---|---|
| public static final int | CREATED
The folder was created. |
| public static final int | DELETED
The folder was deleted. |
| protected transient Folder | folder
The folder the event occurred on. |
| protected transient Folder | newFolder
The folder that represents the new name, in case of a RENAMED event. |
| public static final int | RENAMED
The folder was renamed. |
| private static final long | |
| protected int | type
The event type. |
| Access | Constructor and Description |
|---|---|
| public | FolderEvent(Object
The source of the event source, Folder The affected folder folder, int The event type type)Constructor. |
| public | FolderEvent(Object
The source of the event source, Folder The folder that is renamed oldFolder, Folder The folder that represents the new name newFolder, int The event type type)Constructor. |
| Modifier and Type | Method and Description |
|---|---|
| public void | dispatch(Object
the listener to invoke on listener)Implements abstract javax. |
| public Folder | |
| public Folder | Returns: Folder representing the new name.If this event indicates that a folder is renamed, (i.e, the event type is RENAMED), then this method returns the Folder object representing the new name. |
| public int |
| CREATED | back to summary |
|---|---|
| public static final int CREATED The folder was created. | |
| DELETED | back to summary |
|---|---|
| public static final int DELETED The folder was deleted. | |
| folder | back to summary |
|---|---|
| protected transient Folder folder The folder the event occurred on. | |
| newFolder | back to summary |
|---|---|
| protected transient Folder newFolder The folder that represents the new name, in case of a RENAMED event.
| |
| RENAMED | back to summary |
|---|---|
| public static final int RENAMED The folder was renamed. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| type | back to summary |
|---|---|
| protected int type The event type. | |
| FolderEvent | back to summary |
|---|---|
| public FolderEvent(Object source, Folder folder, int type) Constructor.
| |
| FolderEvent | back to summary |
|---|---|
| public FolderEvent(Object source, Folder oldFolder, Folder newFolder, int type) Constructor. Use for RENAMED events. | |
| dispatch | back to summary |
|---|---|
| public void dispatch(Object listener) Implements abstract javax. Invokes the appropriate FolderListener method
| |
| getFolder | back to summary |
|---|---|
| public Folder getFolder() Return the affected folder.
| |
| getNewFolder | back to summary |
|---|---|
| public Folder getNewFolder() If this event indicates that a folder is renamed, (i.e, the event type is RENAMED), then this method returns the Folder object representing the new name.
The | |
| getType | back to summary |
|---|---|
| public int getType() Return the type of this event.
| |