1 // Copyright 2009 Google Inc. All Rights Reserved.
3 package com
.google
.appengine
.api
.quota
;
5 import com
.google
.appengine
.spi
.ServiceFactoryFactory
;
8 * The factory by which users acquire a handle to the QuotaService.
11 public class QuotaServiceFactory
{
14 * Gets a handle to the quota service. Note that the quota service
15 * always exists, regardless of how many of its features are supported
16 * by a particular app server. If a particular feature (like
17 * {@link QuotaService#getApiTimeInMegaCycles()}) is not accessible, the
18 * instance will not be able to provide that feature and throw an
19 * appropriate exception.
21 * @return a {@code QuotaService} instance.
23 public static QuotaService
getQuotaService() {
24 return getFactory().getQuotaService();
27 private static IQuotaServiceFactory
getFactory() {
28 return ServiceFactoryFactory
.getFactory(IQuotaServiceFactory
.class);