| java.lang.Object | |||
| ↳ | java.util.EventObject | ||
| ↳ | com.google.code.javax.mail.event.MailEvent | ||
| ↳ | com.google.code.javax.mail.event.MessageCountEvent | ||
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 2060
http://www.ietf.org/rfc/rfc2060.txt for details.
A client may want "poll" the folder by occasionally calling the
getMessageCount or isConnected methods
to solicit any such notifications.
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| int | ADDED | The messages were added to their folder | |||||||||
| int | REMOVED | The messages were removed from their folder | |||||||||
| long | serialVersionUID | ||||||||||
|
[Expand]
Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.code.javax.mail.event.MailEvent
| |||||||||||
From class
java.util.EventObject
| |||||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 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. | ||||||||||
| type | The event type. | ||||||||||
|
[Expand]
Inherited Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.util.EventObject
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructor.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Invokes the appropriate MessageCountListener method.
| |||||||||||
Return the array of messages added or removed.
| |||||||||||
Return the type of this event.
| |||||||||||
Indicates whether this event is the result of an explicit
expunge by this client, or due to an expunge from external
sources.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.code.javax.mail.event.MailEvent
| |||||||||||
From class
java.util.EventObject
| |||||||||||
From class
java.lang.Object
| |||||||||||
The messages were added to their folder
The messages were removed from their folder
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.
The event type.
Constructor.
| folder | The containing folder |
|---|---|
| type | The event type |
| 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. If false, this event is the result of an expunge by external sources. |
| msgs | The messages added/removed |
Invokes the appropriate MessageCountListener method.
| listener |
|---|
Return the array of messages added or removed.
Return the type of this event.
Indicates whether this event is the result of an explicit
expunge by this client, or due to an expunge from external
sources. If true, this event is due to an
explicit expunge and hence all remaining messages in this
folder have been renumbered. If false, this event
is due to an external expunge.
Note that this method is valid only if the type of this event
is REMOVED