TransportEvent (Java EE 5)

Java EE API


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
All Implemented Interfaces:
Serializable

public class TransportEvent
extends MailEvent

Extends: java.util.EventObject > MailEvent

此类模拟 Transport 事件。
英文文档:

This class models Transport events.

Author:
John Mani, Max Spivak
See Also:
Transport, TransportListener, Serialized Form

Field Summary
protected  Address[]
static int
static int
static int
protected  Message
protected  int
protected  Address[]
protected  Address[]
 
Fields inherited from class java.util.EventObject
 
Constructor Summary
 
Method Summary
 void
 Address[]
 Message
 int
 Address[]
 Address[]
 
Methods inherited from class java.util.EventObject
 
Methods inherited from class java.lang.Object
 

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
Constructor Detail

public TransportEvent(Transport transport, int type, Address[] validSent, Address[] validUnsent, Address[] invalid, Message msg)
构造方法。
transport Transport 对象
英文文档:

TransportEvent

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

Parameters:
transport - The Transport object

Method Detail

public int getType()
返回此事件的类型。
return 类型
英文文档:

getType

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

Returns:
type

public Address[] getValidSentAddresses()
返回此消息成功发送到的地址。
return 成功将消息发送到的地址,或者返回 null
英文文档:

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

public Address[] getValidUnsentAddresses()
返回未向其发送此消息的有效地址。
return 有效但未能成功将消息发送到的地址,或者返回 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

public Address[] getInvalidAddresses()
返回无法向其发送此消息的地址。
return 消息发送失败的地址,或者返回 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

public Message getMessage()
获取与此 TransportEvent 关联的 Message 对象。
return Message 对象
since
JavaMail 1.2
英文文档:

getMessage

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

Returns:
the Message object
Since:
JavaMail 1.2

public void dispatch(Object listener)
调用相应的 TransportListener 方法。
英文文档:

dispatch

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

Specified by:
dispatch in class MailEvent


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!