Revision created by MOE tool push_codebase.
[gae.git] / java / src / main / com / google / appengine / api / quota / QuotaServiceFactory.java
blob9a32f9d976bedbbeee0e590285c05159a6c14ee4
1 // Copyright 2009 Google Inc. All Rights Reserved.
3 package com.google.appengine.api.quota;
5 import com.google.appengine.spi.ServiceFactoryFactory;
7 /**
8 * The factory by which users acquire a handle to the QuotaService.
11 public class QuotaServiceFactory {
13 /**
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);