javax.mail
Class Quota

java.lang.Object
  extended by javax.mail.Quota

public class Quota
extends Object

A representation of a Quota item for a given quota root.

Version:
$Rev: 421852 $ $Date: 2006-07-14 03:02:19 -0700 (Fri, 14 Jul 2006) $

Nested Class Summary
static class Quota.Resource
          A representation of a given resource definition.
 
Field Summary
 String quotaRoot
          The name of the quota root.
 Quota.Resource[] resources
          The resources associated with this quota root.
 
Constructor Summary
Quota(String quotaRoot)
          Create a Quota with the given name and not resources.
 
Method Summary
 void setResourceLimit(String name, long limit)
          Set a limit value for a resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

quotaRoot

public String quotaRoot
The name of the quota root.


resources

public Quota.Resource[] resources
The resources associated with this quota root.

Constructor Detail

Quota

public Quota(String quotaRoot)
Create a Quota with the given name and not resources.

Parameters:
quotaRoot - The quota root name.
Method Detail

setResourceLimit

public void setResourceLimit(String name,
                             long limit)
Set a limit value for a resource. If the resource is not current associated with this Quota, a new Resource item is added to the resources list.

Parameters:
name - The target resource name.
limit - The new limit value for the resource.


Copyright © 2006 Apache Software Foundation. All Rights Reserved.