TransportEvent (Java EE 5 SDK)

Java

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


javax.mail.event Class TransportEvent

java.lang.Object
  extended by java.util.EventObject
      extended by javax.mail.event.MailEvent
          extended by javax.mail.event.TransportEvent
所有已实现的接口:
Serializable

public class TransportEvent
extends MailEvent

This class models Transport events.

作者:
John Mani, Max Spivak
另请参见:
Transport, TransportListener, Serialized Form

字段摘要
protected  Address[] invalid
           
static 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,
static int MESSAGE_NOT_DELIVERED
          Message was not sent for some reason. validSent[] should be null.
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
 
构造器摘要
TransportEvent(Transport transport, int type, Address[] validSent, Address[] validUnsent, Address[] invalid, Message msg)
          Constructor.
 
方法摘要
 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.
 
类方法继承 java.util.EventObject
getSource, toString
 
类方法继承 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

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.

另请参见:
常量字段


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
构造器详细信息

TransportEvent

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

参数:
transport - The Transport object

方法详细信息

getType

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

返回:
type

getValidSentAddresses

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

返回:
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.

返回:
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.

返回:
Addresses to which the message sending failed or null

getMessage

public Message getMessage()
Get the Message object associated with this Transport Event.

返回:
the Message object
从以下版本开始:
JavaMail 1.2

dispatch

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

规范说明:
dispatch in class MailEvent

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


提交错误或意见

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.