|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.mail.event Class TransportEvent
java.lang.Object java.util.EventObject javax.mail.event.MailEvent javax.mail.event.TransportEvent
- All Implemented Interfaces:
- Serializable
public class TransportEvent
- extends MailEvent
Extends:
java.util.EventObject > MailEvent
此类模拟 Transport 事件。
See also | javax.mail.Transport, javax.mail.event.TransportListener |
This class models Transport events.
- Author:
- John Mani, Max Spivak
- See Also:
Transport
,TransportListener
, Serialized Form
Field Summary | |
---|---|
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 |
Constructor Summary | |
---|---|
TransportEvent(Transport transport,
int type,
Address[] validSent,
Address[] validUnsent,
Address[] invalid,
Message msg)
Constructor. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.util.EventObject |
---|
getSource, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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 |
|
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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!