Movatterモバイル変換


[0]ホーム

URL:


         


Class MessageCountEvent

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

public classMessageCountEvent
extendsMailEvent

This class notifies changes in the number of messages in a folder.

See Also:
Serialized Form

ADDED
          The messages were added to their folder
msgs
          The messages.
removed
          If true, this event is the result of an explicit expunge by this client, and the messages in this folder have been renumbered to account for this.
REMOVED
          The messages were removed from their folder
type
          The event type.
 
Fields inherited from class java.util.EventObject
source
 
MessageCountEvent(Folder folder, int type, boolean removed,Message[] msgs)
          Constructor.
 
dispatch(java.lang.Object listener)
          Invokes the appropriate MessageCountListener method.
getMessages()
          Return the array of messages added or removed.
getType()
          Return the type of this event.
isRemoved()
          Indicates whether this event is the result of an explicit expunge by this client, or due to an expunge from external sources.
 
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
 

ADDED

public static final intADDED
The messages were added to their folder

REMOVED

public static final intREMOVED
The messages were removed from their folder

type

protected inttype
The event type.

removed

protected booleanremoved
If true, this event is the result of an explicit expunge by this client, and the messages in this folder have been renumbered to account for this. If false, this event is the result of an expunge by external sources.

msgs

protected transientMessage[]msgs
The messages.

MessageCountEvent

publicMessageCountEvent(Folder folder,                         int type,                         boolean removed,Message[] msgs)
Constructor.
Parameters:
source - The containing folder
type - The event type
removed - If true, this event is the result of an explicitexpunge by this client, and the messages in this folder have been renumbered to account for this.If false, this event is the result of an expungeby external sources.
msgs - The messages added/removed

getType

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

isRemoved

public booleanisRemoved()
Indicates whether this event is the result of an explicit expunge by this client, or due to an expunge from external sources. Iftrue, this event is due to an explicit expunge and hence all remaining messages in this folder have been renumbered. Iffalse, this event is due to an external expunge.

Note that this method is valid only if the type of this event isREMOVED


getMessages

publicMessage[]getMessages()
Return the array of messages added or removed.
Returns:
array of messages

dispatch

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

         


[8]ページ先頭

©2009-2025 Movatter.jp