⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
javax.mail.event

Class TransportEvent

EventObject
|
+--javax.mail.event.MailEvent
   |
   +--javax.mail.event.TransportEvent


public class TransportEvent
extends MailEvent

This class models Transport events.
Author:

Field Summary

static int

MESSAGE_DELIVERED

Message has been successfully delivered to all recipients by the transport firing this event.

static int

MESSAGE_NOT_DELIVERED

Message was not sent for some reason.

static int

MESSAGE_PARTIALLY_DELIVERED

Message was successfully sent to some recipients but not to all.

transient Address[]

invalid

transient Message

msg

int

type

The event type.

transient Address[]

validSent

transient Address[]

validUnsent

Constructor Summary

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

Constructor.

Method Summary

void

dispatch(Object listener)

Invokes the appropriate TransportListener method.

Address[]

getInvalidAddresses()

Return the addresses to which this message could not be sent.

Message

getMessage()

Get the Message object associated with this Transport Event.

int

getType()

Return the type of this event.

Address[]

getValidSentAddresses()

Return the addresses to which this message was sent succesfully.

Address[]

getValidUnsentAddresses()

Return the addresses that are valid but to which this message was not sent.

Field Details

MESSAGE_DELIVERED

public static final int MESSAGE_DELIVERED

Message has been successfully delivered to all recipients by the transport firing this event. validSent[] contains all the addresses this transport sent to successfully. validUnsent[] and invalid[] should be null.


MESSAGE_NOT_DELIVERED

public static final int MESSAGE_NOT_DELIVERED

Message was not sent for some reason. validSent[] should be null. validUnsent[] may have addresses that are valid (but the message wasn't sent to them). invalid[] should likely contain invalid addresses.


MESSAGE_PARTIALLY_DELIVERED

public static final int MESSAGE_PARTIALLY_DELIVERED

Message was successfully sent to some recipients but not to all. validSent[] holds addresses of recipients to whom the message was sent. validUnsent[] holds valid addresses to which the message was not sent. invalid[] holds invalid addresses, if any.


invalid

protected transient Address[] invalid


msg

protected transient Message msg


type

protected int type

The event type.


validSent

protected transient Address[] validSent


validUnsent

protected transient Address[] validUnsent

Constructor Details

TransportEvent

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

Constructor.

Parameters:
transport - The Transport object
type
validSent
validUnsent
invalid
msg

Method Details

dispatch

public void dispatch(Object listener)

Invokes the appropriate TransportListener method.

Parameters:
listener

getInvalidAddresses

public Address[] getInvalidAddresses()

Return the addresses to which this message could not be sent.


getMessage

public Message getMessage()

Get the Message object associated with this Transport Event.


getType

public int getType()

Return the type of this event.


getValidSentAddresses

public Address[] getValidSentAddresses()

Return the addresses to which this message was sent succesfully.


getValidUnsentAddresses

public Address[] getValidUnsentAddresses()

Return the addresses that are valid but to which this message was not sent.