Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.mail.event
Class MessageCountEvent  view MessageCountEvent download MessageCountEvent.java

java.lang.Object
  extended byjava.util.EventObject
      extended byjavax.mail.event.MailEvent
          extended byjavax.mail.event.MessageCountEvent
All Implemented Interfaces:
java.io.Serializable

public class MessageCountEvent
extends MailEvent

Event indicating a change in the number of messages in a folder.

Version:
$Rev: 125583 $ $Date: 2005-01-18 19:44:27 -0800 (Tue, 18 Jan 2005) $

Field Summary
static int ADDED
          Messages were added to the folder.
protected  javax.mail.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.
static int REMOVED
          Messages were removed from the folder.
protected  int type
          The event type.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
MessageCountEvent(javax.mail.Folder folder, int type, boolean removed, javax.mail.Message[] messages)
          Construct a new event.
 
Method Summary
 void dispatch(java.lang.Object listener)
           
 javax.mail.Message[] getMessages()
          Return the affected messages.
 int getType()
          Return the event type.
 boolean isRemoved()
           
 
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
 

Field Detail

ADDED

public static final int ADDED
Messages were added to the folder.

See Also:
Constant Field Values

REMOVED

public static final int REMOVED
Messages were removed from the folder.

See Also:
Constant Field Values

msgs

protected transient javax.mail.Message[] msgs
The affected messages.


type

protected int type
The event type.


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.

Constructor Detail

MessageCountEvent

public MessageCountEvent(javax.mail.Folder folder,
                         int type,
                         boolean removed,
                         javax.mail.Message[] messages)
Construct a new event.

Method Detail

getType

public int getType()
Return the event type.


isRemoved

public boolean isRemoved()

getMessages

public javax.mail.Message[] getMessages()
Return the affected messages.


dispatch

public void dispatch(java.lang.Object listener)
Specified by:
dispatch in class MailEvent