Package javax.mail.event
Class TransportEvent
- java.lang.Object
-
- java.util.EventObject
-
- javax.mail.event.MailEvent
-
- javax.mail.event.TransportEvent
-
- All Implemented Interfaces:
java.io.Serializable
public class TransportEvent extends MailEvent
A transport event.- Version:
- 1.4
- Author:
- Chris Burdess
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Address[]
invalid
static int
MESSAGE_DELIVERED
The message was successfully delivered to all recipients.static int
MESSAGE_NOT_DELIVERED
The message was not sent.static int
MESSAGE_PARTIALLY_DELIVERED
The message was successfully sent to some but not all of the recipients.protected Message
msg
protected int
type
The event type.protected Address[]
validSent
protected Address[]
validUnsent
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispatch(java.lang.Object listener)
Invokes the appropriate listener method.Address[]
getInvalidAddresses()
Returns the addresses to which this message could not be sent.Message
getMessage()
Returns the message.int
getType()
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
-
MESSAGE_DELIVERED
public static final int MESSAGE_DELIVERED
The message was successfully delivered to all recipients.- See Also:
- Constant Field Values
-
MESSAGE_NOT_DELIVERED
public static final int MESSAGE_NOT_DELIVERED
The message was not sent.- See Also:
- Constant Field Values
-
MESSAGE_PARTIALLY_DELIVERED
public static final int MESSAGE_PARTIALLY_DELIVERED
The message was successfully sent to some but not all of the recipients.- See Also:
- Constant Field Values
-
type
protected int type
The event type.
-
validSent
protected transient Address[] validSent
-
validUnsent
protected transient Address[] validUnsent
-
invalid
protected transient Address[] invalid
-
msg
protected transient Message msg
-
-
Constructor Detail
-
TransportEvent
public TransportEvent(Transport transport, int type, Address[] validSent, Address[] validUnsent, Address[] invalid, Message msg)
Constructor.- Parameters:
source
- the transporttype
- the event typevalidSent
- the valid sent addressesvalidUnsent
- the valid unsent addressesinvalid
- the invalid addressesmsg
- the message
-
-
Method Detail
-
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.
-
getInvalidAddresses
public Address[] getInvalidAddresses()
Returns the addresses to which this message could not be sent.
-
getMessage
public Message getMessage()
Returns the message.
-
-