FolderClosedException (Java EE 5)

Java EE API


javax.mail Class FolderClosedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by javax.mail.MessagingException
              extended by javax.mail.FolderClosedException
All Implemented Interfaces:
Serializable

public class FolderClosedException
extends MessagingException

Extends: Throwable > Exception > MessagingException

当在 Messaging 对象上调用某个方法而拥有该对象的 Folder 由于某个原因已经停用时,抛出此异常。

在抛出该异常后,该 Folder 被重置为 "closed" 状态。该 Folder 拥有的所有 Messaging 对象都应被认为是无效的。可使用 "open" 方法重新打开该 Folder 以重新建立失去的连接。

getMessage() 方法返回更详细的有关导致此异常的错误的信息。

英文文档:

This exception is thrown when a method is invoked on a Messaging object and the Folder that owns that object has died due to some reason.

Following the exception, the Folder is reset to the "closed" state. All messaging objects owned by the Folder should be considered invalid. The Folder can be reopened using the "open" method to reestablish the lost connection.

The getMessage() method returns more detailed information about the error that caused this exception.

Author:
John Mani
See Also:
Serialized Form

Constructor Summary
 
Method Summary
 Folder
 
Methods inherited from class javax.mail.MessagingException
 
Methods inherited from class java.lang.Throwable
 
Methods inherited from class java.lang.Object
 

Constructor Detail

public FolderClosedException(Folder folder)
Constructor
folder Folder
英文文档:

FolderClosedException

public FolderClosedException(Folder folder)
Constructor

Parameters:
folder - the Folder


public FolderClosedException(Folder folder, String message)
Constructor
folder Folder
message 详细的错误消息
英文文档:

FolderClosedException

public FolderClosedException(Folder folder,
                             String message)
Constructor

Parameters:
folder - the Folder
message - the detailed error message

Method Detail

public Folder getFolder()
返回停用的 Folder 对象。
英文文档:

getFolder

public Folder getFolder()
Returns the dead Folder object



Submit a bug or feature

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

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

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