Module jakarta.mail

Class MessageCountEvent

java.lang.Object
java.util.EventObject
jakarta.mail.event.MailEvent
jakarta.mail.event.MessageCountEvent
All Implemented Interfaces:
Serializable

public class MessageCountEvent extends MailEvent
This class notifies changes in the number of messages in a folder.

Note that some folder types may only deliver MessageCountEvents at certain times or after certain operations. IMAP in particular will only notify the client of MessageCountEvents when a client issues a new command. Refer to RFC 3501 for details. A client may want to "poll" the folder by occasionally calling the getMessageCount or isOpen methods to solicit any such notifications.

See Also: