javax.mail.event

Class MessageChangedEvent


public class MessageChangedEvent
extends MailEvent

This class models Message change events.

Field Summary

static int
ENVELOPE_CHANGED
The message's envelope(headers, but not body) changed.
static int
FLAGS_CHANGED
The message's flags changed.
protected Message
msg
The message that changed.
protected int
type
The event type.

Constructor Summary

MessageChangedEvent(Object source, int type, Message msg)
Constructor.

Method Summary

void
dispatch(Object listener)
Invokes the appropriate MessageChangedListener method.
Message
getMessage()
Return the changed Message.
int
getMessageChangeType()
Return the type of this event.

Methods inherited from class javax.mail.event.MailEvent

dispatch

Field Details

ENVELOPE_CHANGED

public static final int ENVELOPE_CHANGED
The message's envelope(headers, but not body) changed.

Field Value:
2


FLAGS_CHANGED

public static final int FLAGS_CHANGED
The message's flags changed.

Field Value:
1


msg

protected Message msg
The message that changed.


type

protected int type
The event type.

Constructor Details

MessageChangedEvent

public MessageChangedEvent(Object source,
                           int type,
                           Message msg)
Constructor.

Parameters:
source - The folder that owns the message
type - The change type
msg - The changed message

Method Details

dispatch

public void dispatch(Object listener)
Invokes the appropriate MessageChangedListener method.
Overrides:
dispatch in interface MailEvent


getMessage

public Message getMessage()
Return the changed Message.


getMessageChangeType

public int getMessageChangeType()
Return the type of this event.