javax.mail.event
Class MessageCountEvent
public class MessageCountEvent
Event indicating a change in the number of messages in a folder.
static int | ADDED - Messages were added to the folder.
|
static int | REMOVED - Messages were removed from the folder.
|
protected Message[] | msgs - The affected messages.
|
protected boolean | removed - If true, then messages were expunged from the folder by this client
and message numbers reflect the deletion; if false, then the change
was the result of an expunge by a different client.
|
protected int | type - The event type.
|
ADDED
public static final int ADDED
Messages were added to the folder.
REMOVED
public static final int REMOVED
Messages were removed from the folder.
msgs
protected Message[] msgs
The affected messages.
removed
protected boolean removed
If true, then messages were expunged from the folder by this client
and message numbers reflect the deletion; if false, then the change
was the result of an expunge by a different client.
type
protected int type
The event type.
MessageCountEvent
public MessageCountEvent(Folder folder,
int type,
boolean removed,
messages[] )
Construct a new event.
folder
- the folder containing the messagestype
- the event typeremoved
- indicator of whether messages were expunged by this client
getMessages
public Message[] getMessages()
Return the affected messages.
getType
public int getType()
Return the event type.
isRemoved
public boolean isRemoved()
- whether this event was the result of an expunge by this client