Movatterモバイル変換


[0]ホーム

URL:


         


Class FolderEvent

java.lang.Object  |  +--java.util.EventObject        |        +--javax.mail.event.MailEvent              |              +--javax.mail.event.FolderEvent
All Implemented Interfaces:
java.io.Serializable

public classFolderEvent
extendsMailEvent

This class models Folderexistence 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:
Serialized Form

CREATED
          The folder was created.
DELETED
          The folder was deleted.
folder
          The folder the event occurred on.
newFolder
          The folder that represents the new name, in case of a RENAMED event.
RENAMED
          The folder was renamed.
type
          The event type.
 
Fields inherited from class java.util.EventObject
source
 
FolderEvent(java.lang.Object source,Folder oldFolder,Folder newFolder, int type)
          Constructor.
FolderEvent(java.lang.Object source,Folder folder, int type)
          Constructor.
 
dispatch(java.lang.Object listener)
          Invokes the appropriate FolderListener method
getFolder()
          Return the affected 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.
getType()
          Return 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
 

CREATED

public static final intCREATED
The folder was created.

DELETED

public static final intDELETED
The folder was deleted.

RENAMED

public static final intRENAMED
The folder was renamed.

type

protected inttype
The event type.

folder

protected transientFolderfolder
The folder the event occurred on.

newFolder

protected transientFoldernewFolder
The folder that represents the new name, in case of a RENAMED event.
Since:
JavaMail 1.1

FolderEvent

publicFolderEvent(java.lang.Object source,Folder folder,                   int type)
Constructor.

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

FolderEvent

publicFolderEvent(java.lang.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
Since:
JavaMail 1.1

getType

public intgetType()
Return the type of this event.
Returns:
type

getFolder

publicFoldergetFolder()
Return the affected folder.
Returns:
the affected folder
See Also:
getNewFolder()

getNewFolder

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

ThegetFolder() method returns the folder that is renamed.

Returns:
Folder representing the new name.
Since:
JavaMail 1.1
See Also:
getFolder()

dispatch

public voiddispatch(java.lang.Object listener)
Invokes the appropriate FolderListener method
Overrides:
dispatch in classMailEvent

         


[8]ページ先頭

©2009-2025 Movatter.jp