javax.mail.event

Class StoreEvent


public class StoreEvent
extends MailEvent

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.

Field Summary

static int
ALERT
Indicates that this message is an ALERT.
static int
NOTICE
Indicates that this message is a NOTICE.
protected String
message
The message text to be presented to the user.
protected int
type
The event type.

Constructor Summary

StoreEvent(Store source, int type, String message)
Constructor.

Method Summary

void
dispatch(Object listener)
Invokes the appropriate StoreListener method.
String
getMessage()
Get the message from the Store.
int
getMessageType()
Return the type of this event.

Methods inherited from class javax.mail.event.MailEvent

dispatch

Field Details

ALERT

public static final int ALERT
Indicates that this message is an ALERT.

Field Value:
1


NOTICE

public static final int NOTICE
Indicates that this message is a NOTICE.

Field Value:
2


message

protected String message
The message text to be presented to the user.


type

protected int type
The event type.

Constructor Details

StoreEvent

public StoreEvent(Store source,
                  int type,
                  String message)
Constructor.

Parameters:
source - The source Store

Method Details

dispatch

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


getMessage

public String getMessage()
Get the message from the Store.


getMessageType

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

See Also:
ALERT, NOTICE