This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.mail.event
class FolderEvent

javax.mail.event.MailEvent extended by javax.mail.event.FolderEvent

public class FolderEvent
extends MailEvent

This class models Folder existence events. FolderEvents are delivered to FolderListeners registered on the affected Folder as well as the containing Store.

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).

See Also (auto-generated):

Folder

Session

Message


Field Summary
static int CREATED
          The folder was created.
static 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.
static int RENAMED
          The folder was renamed.
protected int type
          The event type.
 
Constructor Summary
FolderEvent(Object source, Folder oldFolder, Folder newFolder, int type)

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

          Constructor.
 
Method Summary
 void
dispatch(Object listener)

          Invokes the appropriate FolderListener method
 Folder

          Return the affected folder.
 Folder

          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.
 int

          Return the type of this event.
 
Methods inherited from class javax.mail.event.MailEvent
dispatch
 

Field Detail

CREATED

public static final int CREATED
The folder was created.

DELETED

public static final int DELETED
The folder was deleted.

folder

protected transient Folder folder
The folder the event occurred on.

newFolder

protected transient Folder newFolder
The folder that represents the new name, in case of a RENAMED event.

RENAMED

public static final int RENAMED
The folder was renamed.

type

protected int type
The event type.
Constructor Detail

FolderEvent

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

Parameters:
source - The source of the event
oldFolder - The folder that is renamed
newFolder - The folder that represents the new name
type - The event type

FolderEvent

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

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

dispatch

public void dispatch(Object listener)
Invokes the appropriate FolderListener method

Overrides:
dispatch in class MailEvent
Parameters:
listener

getFolder

public Folder getFolder()
Return the affected folder.

Returns:
the affected folder

getNewFolder

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 getFolder() method returns the folder that is renamed.

Returns:
Folder representing the new name.

getType

public int getType()
Return the type of this event.

Returns:
type


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention. The official Sun™ documentation can be found here at http://java.sun.com/products/javamail/javadocs/index.html.