public class

TransportEvent

extends MailEvent
java.lang.Object
   ↳ java.util.EventObject
     ↳ com.google.code.javax.mail.event.MailEvent
       ↳ com.google.code.javax.mail.event.TransportEvent

Class Overview

This class models Transport events.

See Also
  • javax.mail.Transport
  • javax.mail.event.TransportListener

Summary

Constants
int MESSAGE_DELIVERED Message has been successfully delivered to all recipients by the transport firing this event.
int MESSAGE_NOT_DELIVERED Message was not sent for some reason.
int MESSAGE_PARTIALLY_DELIVERED Message was successfully sent to some recipients but not to all.
long serialVersionUID
[Expand]
Inherited Constants
From class com.google.code.javax.mail.event.MailEvent
From class java.util.EventObject
Fields
protected Address[] invalid
protected Message msg
protected int type The event type.
protected Address[] validSent
protected Address[] validUnsent
[Expand]
Inherited Fields
From class java.util.EventObject
Public Constructors
TransportEvent(Transport transport, int type, Address[] validSent, Address[] validUnsent, Address[] invalid, Message msg)
Constructor.
Public Methods
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.
[Expand]
Inherited Methods
From class com.google.code.javax.mail.event.MailEvent
From class java.util.EventObject
From class java.lang.Object

Constants

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,

Constant Value: 1 (0x00000001)

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.

Constant Value: 2 (0x00000002)

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.

Constant Value: 3 (0x00000003)

private static final long serialVersionUID

Constant Value: -4729852364684273073 (0xbe5c30558af3da4f)

Fields

protected Address[] invalid

protected Message msg

protected int type

The event type.

protected Address[] validSent

protected Address[] validUnsent

Public Constructors

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

Public Methods

public void dispatch (Object listener)

Invokes the appropriate TransportListener method.

Parameters
listener

public Address[] getInvalidAddresses ()

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

Returns
  • Addresses to which the message sending failed or null

public Message getMessage ()

Get the Message object associated with this Transport Event.

Returns
  • the Message object

public int getType ()

Return the type of this event.

Returns
  • type

public Address[] getValidSentAddresses ()

Return the addresses to which this message was sent succesfully.

Returns
  • Addresses to which the message was sent successfully or null

public Address[] getValidUnsentAddresses ()

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

Returns
  • Addresses that are valid but to which the message was not sent successfully or null