Top Description Inners Fields Constructors Methods
javax.mail

public Class Quota

extends Object
Class Inheritance

This class represents a set of quotas for a given quota root. Each quota root has a set of resources, represented by the Quota.Resource class. Each resource has a name (for example, "STORAGE"), a current usage, and a usage limit. See RFC 2087.
Author
Bill Shannon
Since
JavaMail 1.4

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Quota.Resource

An individual resource in a quota root.

Field Summary

Modifier and TypeField and Description
public String
quotaRoot

The name of the quota root.

public Quota.Resource[]
resources

The set of resources associated with this quota root.

Constructor Summary

AccessConstructor and Description
public
Quota(String
the name of the quota root
quotaRoot
)

Create a Quota object for the named quotaroot with no associated resources.

Method Summary

Modifier and TypeMethod and Description
public void
setResourceLimit(String
the name of the resource
name
,
long
the resource limit
limit
)

Set a resource limit for this quota root.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

quotaRootback to summary
public String quotaRoot

The name of the quota root.

resourcesback to summary
public Quota.Resource[] resources

The set of resources associated with this quota root.

Constructor Detail

Quotaback to summary
public Quota(String quotaRoot)

Create a Quota object for the named quotaroot with no associated resources.

Parameters
quotaRoot:String

the name of the quota root

Method Detail

setResourceLimitback to summary
public void setResourceLimit(String name, long limit)

Set a resource limit for this quota root.

Parameters
name:String

the name of the resource

limit:long

the resource limit

javax.mail back to summary

public Class Quota.Resource

extends Object
Class Inheritance

An individual resource in a quota root.
Since
JavaMail 1.4

Field Summary

Modifier and TypeField and Description
public long
limit

The usage limit for the resource.

public String
name

The name of the resource.

public long
usage

The current usage of the resource.

Constructor Summary

AccessConstructor and Description
public
Resource(String
the resource name
name
,
long
the current usage of the resource
usage
,
long
the usage limit for the resource
limit
)

Construct a Resource object with the given name, usage, and limit.

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

limitback to summary
public long limit

The usage limit for the resource.

nameback to summary
public String name

The name of the resource.

usageback to summary
public long usage

The current usage of the resource.

Constructor Detail

Resourceback to summary
public Resource(String name, long usage, long limit)

Construct a Resource object with the given name, usage, and limit.

Parameters
name:String

the resource name

usage:long

the current usage of the resource

limit:long

the usage limit for the resource