javax.mail.event

Class TransportEvent

public class TransportEvent extends MailEvent

A transport event.

Version: 1.3

Author: Chris Burdess

Field Summary
protected Address[]invalid
protected Messagemsg
static intMESSAGE_DELIVERED
The message was successfully delivered to all recipients.
static intMESSAGE_NOT_DELIVERED
The message was not sent.
static intMESSAGE_PARTIALLY_DELIVERED
The message was successfully sent to some but not all of the recipients.
protected inttype
The event type.
protected Address[]validSent
protected Address[]validUnsent
Constructor Summary
TransportEvent(Transport transport, int type, Address[] validSent, Address[] validUnsent, Address[] invalid, Message msg)
Constructor.
Method Summary
voiddispatch(Object listener)
Invokes the appropriate listener method.
Address[]getInvalidAddresses()
Returns the addresses to which this message could not be sent.
MessagegetMessage()
Returns the message.
intgetType()
Returns the type of this event.
Address[]getValidSentAddresses()
Returns the addresses to which this message was delivered succesfully.
Address[]getValidUnsentAddresses()
Returns the addresses that are valid but to which this message was not delivered.

Field Detail

invalid

protected transient Address[] invalid

msg

protected transient Message msg

MESSAGE_DELIVERED

public static final int MESSAGE_DELIVERED
The message was successfully delivered to all recipients.

MESSAGE_NOT_DELIVERED

public static final int MESSAGE_NOT_DELIVERED
The message was not sent.

MESSAGE_PARTIALLY_DELIVERED

public static final int MESSAGE_PARTIALLY_DELIVERED
The message was successfully sent to some but not all of the recipients.

type

protected int type
The event type.

validSent

protected transient Address[] validSent

validUnsent

protected transient Address[] validUnsent

Constructor Detail

TransportEvent

public TransportEvent(Transport transport, int type, Address[] validSent, Address[] validUnsent, Address[] invalid, Message msg)
Constructor.

Parameters: source the transport type the event type validSent the valid sent addresses validUnsent the valid unsent addresses invalid the invalid addresses msg the message

Method Detail

dispatch

public void dispatch(Object listener)
Invokes the appropriate listener method.

getInvalidAddresses

public Address[] getInvalidAddresses()
Returns the addresses to which this message could not be sent.

getMessage

public Message getMessage()
Returns the message.

getType

public int getType()
Returns the type of this event.

getValidSentAddresses

public Address[] getValidSentAddresses()
Returns the addresses to which this message was delivered succesfully.

getValidUnsentAddresses

public Address[] getValidUnsentAddresses()
Returns the addresses that are valid but to which this message was not delivered.
©