QuotaAwareStore (Java EE 5)

Java EE API


javax.mail Interface QuotaAwareStore


public interface QuotaAwareStore


由支持配额的 Store 实现的接口。getQuotasetQuota 方法支持 IMAP QUOTA 扩展定义的配额模型。有关的更多信息,请参见 RFC 2087

英文文档:

An interface implemented by Stores that support quotas. The getQuota and setQuota methods support the quota model defined by the IMAP QUOTA extension. Refer to RFC 2087 for more information.

Since:
JavaMail 1.4

Method Summary
 Quota[]
 void
 

Method Detail

public Quota[] getQuota(String root) throws MessagingException
获取指定配额根的配额。配额是基于配额根进行控制的,不一定是基于文件夹。文件夹与配额根之间的关系取决于服务器。对于某个用户拥有的所有文件夹,某些服务器只实现一个配额根。另一些服务器可能针对每个文件夹都实现单独的配额根。单个文件夹甚至可以拥有多个配额根,这些配额根可能控制不同资源的配额。
root 配额根的名称
return Quota 对象数组
ThrowsMessagingException: 如果服务器不支持 QUOTA 扩展
英文文档:

getQuota

Quota[] getQuota(String root)
                 throws MessagingException
Get the quotas for the named quota root. Quotas are controlled on the basis of a quota root, not (necessarily) a folder. The relationship between folders and quota roots depends on the server. Some servers might implement a single quota root for all folders owned by a user. Other servers might implement a separate quota root for each folder. A single folder can even have multiple quota roots, perhaps controlling quotas for different resources.

Parameters:
root - the name of the quota root
Returns:
array of Quota objects
Throws:
MessagingException - if the server doesn't support the QUOTA extension

public void setQuota(Quota quota) throws MessagingException
为 quota 参数中指定的配额根设置配额。通常此配额是用 getQuota 方法获取的配额根中的一个,但不一定如此。
quota 要设置的配额
ThrowsMessagingException: 如果服务器不支持 QUOTA 扩展
英文文档:

setQuota

void setQuota(Quota quota)
              throws MessagingException
Set the quotas for the quota root specified in the quota argument. Typically this will be one of the quota roots obtained from the getQuota method, but it need not be.

Parameters:
quota - the quota to set
Throws:
MessagingException - if the server doesn't support the QUOTA extension


Submit a bug or feature

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

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

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