|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.mail Class SendFailedException
java.lang.Object java.lang.Throwable java.lang.Exception javax.mail.MessagingException javax.mail.SendFailedException
- All Implemented Interfaces:
- Serializable
public class SendFailedException
- extends MessagingException
Extends:
Throwable > Exception > MessagingException
当该消息无法发送时,抛出此异常。
该异常包括那些消息无法发送到的地址,以及消息发送到的有效地址和消息未发送到的有效地址。
See also | send, sendMessage, javax.mail.event.TransportEvent |
This exception is thrown when the message cannot be sent.
The exception includes those addresses to which the message could not be sent as well as the valid addresses to which the message was sent and valid addresses to which the message was not sent.
- Author:
- John Mani, Max Spivak
- See Also:
Transport.send(javax.mail.Message)
,Transport.sendMessage(javax.mail.Message, javax.mail.Address[])
,TransportEvent
, Serialized Form
Field Summary | |
---|---|
protected Address[] |
invalid
|
protected Address[] |
validSent
|
protected Address[] |
validUnsent
|
Constructor Summary | |
---|---|
SendFailedException()
Constructs a SendFailedException with no detail message. |
|
SendFailedException(String s)
Constructs a SendFailedException with the specified detail message. |
|
SendFailedException(String s,
Exception e)
Constructs a SendFailedException with the specified Exception and detail message. |
|
SendFailedException(String msg,
Exception ex,
Address[] validSent,
Address[] validUnsent,
Address[] invalid)
Constructs a SendFailedException with the specified string and the specified address objects. |
Method Summary | |
---|---|
Address[] |
getInvalidAddresses()
Return the addresses to which this message could not be sent. |
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 javax.mail.MessagingException |
---|
getCause, getNextException, setNextException, toString |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
英文文档:
invalid
protected transient Address[] invalid
英文文档:
validSent
protected transient Address[] validSent
英文文档:
validUnsent
protected transient Address[] validUnsent
Constructor Detail |
---|
public
SendFailedException()
构造不带详细消息的 SendFailedException。
英文文档:
SendFailedException
public SendFailedException()
- Constructs a SendFailedException with no detail message.
public
SendFailedException(String s)
构造带指定详细消息的 SendFailedException。
s | 详细信息 |
SendFailedException
public SendFailedException(String s)
- Constructs a SendFailedException with the specified detail message.
- Parameters:
s
- the detail message
public
SendFailedException(String s, Exception e)
构造带指定 Exception 和详细消息的 SendFailedException。指定的异常链接到此异常。
s | 详细信息 |
e | 嵌入的异常 |
See also | getNextException, setNextException |
SendFailedException
public SendFailedException(String s, Exception e)
- Constructs a SendFailedException with the specified
Exception and detail message. The specified exception is chained
to this exception.
- Parameters:
s
- the detail messagee
- the embedded exception- See Also:
MessagingException.getNextException()
,MessagingException.setNextException(java.lang.Exception)
public
SendFailedException(String msg, Exception ex, Address[] validSent, Address[] validUnsent, Address[] invalid)
构造带指定字符串和指定地址对象的 SendFailedException。
msg | 详细信息 |
ex | 嵌入的异常 |
validSent | 消息发送到的有效地址 |
validUnsent | 消息未发送到的有效地址 |
invalid | 无效地址 |
See also | getNextException, setNextException |
SendFailedException
public SendFailedException(String msg, Exception ex, Address[] validSent, Address[] validUnsent, Address[] invalid)
- Constructs a SendFailedException with the specified string
and the specified address objects.
- Parameters:
msg
- the detail messageex
- the embedded exceptionvalidSent
- valid addresses to which message was sentvalidUnsent
- valid addresses to which message was not sentinvalid
- the invalid addresses- See Also:
MessagingException.getNextException()
,MessagingException.setNextException(java.lang.Exception)
Method Detail |
---|
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;
|
|||||||||
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 : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!