- java.lang.Object
-
- java.util.EventObject
-
- javax.mail.event.MailEvent
-
- javax.mail.event.TransportEvent
-
- All Implemented Interfaces:
- Serializable
public class TransportEvent extends MailEvent
This class models Transport events.- Author:
- John Mani, Max Spivak
- See Also:
Transport
,TransportListener
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description protected Address[]
invalid
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.protected Message
msg
protected int
type
The event type.protected Address[]
validSent
protected Address[]
validUnsent
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor and Description TransportEvent(Transport transport, int type, Address[] validSent, Address[] validUnsent, Address[] invalid, Message msg)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description 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 Detail
-
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,- See Also:
- Constant Field Values
-
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.- See Also:
- Constant Field Values
-
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.- 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
-
-
Method Detail
-
getType
public int getType()
Return the type of this event.- Returns:
- type
-
getValidSentAddresses
public Address[] getValidSentAddresses()
Return the addresses to which this message was sent succesfully.- Returns:
- Addresses to which the message was sent successfully or null
-
getValidUnsentAddresses
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
-
getInvalidAddresses
public Address[] getInvalidAddresses()
Return the addresses to which this message could not be sent.- Returns:
- Addresses to which the message sending failed or null
-
getMessage
public Message getMessage()
Get the Message object associated with this Transport Event.- Returns:
- the Message object
- Since:
- JavaMail 1.2
-
-
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 11/06/2005, zuletzt geändert 18/08/2025
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-javaee-rf-javax/mail/event/TransportEvent.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.
Referenzen
Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor dieser Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.