Package jakarta.mail.event
Class MessageChangedEvent
java.lang.Object
java.util.EventObject
jakarta.mail.event.MailEvent
jakarta.mail.event.MessageChangedEvent
- All Implemented Interfaces:
Serializable
This class models Message change events.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe message's envelope (headers, but not body) changed.static final intThe message's flags changed.protected MessageThe message that changed.protected intThe event type.Fields inherited from class java.util.EventObject
source -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInvokes the appropriate MessageChangedListener method.Return the changed Message.intReturn the type of this event.Methods inherited from class java.util.EventObject
getSource, toString
-
Field Details
-
FLAGS_CHANGED
public static final int FLAGS_CHANGEDThe message's flags changed.- See Also:
-
ENVELOPE_CHANGED
public static final int ENVELOPE_CHANGEDThe message's envelope (headers, but not body) changed.- See Also:
-
type
protected int typeThe event type. -
msg
The message that changed.
-
-
Constructor Details
-
MessageChangedEvent
Constructor.- Parameters:
source- The folder that owns the messagetype- The change typemsg- The changed message
-
-
Method Details
-
getMessageChangeType
public int getMessageChangeType()Return the type of this event.- Returns:
- type
-
getMessage
Return the changed Message.- Returns:
- the message
-
dispatch
Invokes the appropriate MessageChangedListener method.
-