Package jakarta.mail.event
Class StoreEvent
java.lang.Object
java.util.EventObject
jakarta.mail.event.MailEvent
jakarta.mail.event.StoreEvent
- All Implemented Interfaces:
Serializable
This class models notifications from the Store connection. These
notifications can be ALERTS or NOTICES. ALERTS must be presented
to the user in a fashion that calls the user's attention to the
message.
- Author:
- John Mani
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Indicates that this message is an ALERT.protected String
The message text to be presented to the user.static final int
Indicates that this message is a NOTICE.protected int
The event type.Fields inherited from class java.util.EventObject
source
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Invokes the appropriate StoreListener method.Get the message from the Store.int
Return the type of this event.Methods inherited from class java.util.EventObject
getSource, toString
-
Field Details
-
ALERT
public static final int ALERTIndicates that this message is an ALERT.- See Also:
-
NOTICE
public static final int NOTICEIndicates that this message is a NOTICE.- See Also:
-
type
protected int typeThe event type. -
message
The message text to be presented to the user.
-
-
Constructor Details
-
StoreEvent
Construct a StoreEvent.- Parameters:
store
- the source Storetype
- the event typemessage
- a message assoicated with the event
-
-
Method Details
-
getMessageType
public int getMessageType()Return the type of this event. -
getMessage
Get the message from the Store.- Returns:
- message from the Store
-
dispatch
Invokes the appropriate StoreListener method.
-