javax.mail.event
Class FolderEvent

java.lang.Object
  extended byjava.util.EventObject
      extended byjavax.mail.event.MailEvent
          extended byjavax.mail.event.FolderEvent
All Implemented Interfaces:
java.io.Serializable

public class FolderEvent
extends MailEvent

A folder event.

Version:
1.3
Author:
Chris Burdess
See Also:
Serialized Form

Field Summary
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.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
FolderEvent(java.lang.Object source, Folder oldFolder, Folder newFolder, int type)
          Constructor for RENAMED events.
FolderEvent(java.lang.Object source, Folder folder, int type)
          Constructor.
 
Method Summary
 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.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 source
folder - the affected folder
type - the event type (CREATED or DELETED)

FolderEvent

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

Parameters:
source - the source
oldFolder - the folder that is renamed
newFolder - the folder that represents the new name
type - the event type (RENAMED)
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()

dispatch

public void dispatch(java.lang.Object listener)
Invokes the appropriate listener method.

Specified by:
dispatch in class MailEvent


© Copyright 2003, 2004 The Free Software Foundation, All rights reserved