App Engine Python SDK version 1.8.4
[gae.git] / java / src / main / com / google / appengine / api / conversion / ConversionService.java
blob328bf5fd2786f29719dd26c5be5f51acd2e663c0
1 // Copyright 2011 Google Inc. All Rights Reserved.
3 package com.google.appengine.api.conversion;
5 import java.util.List;
6 import java.util.concurrent.Future;
8 /**
9 * A service which provides document conversion feature for applications.
12 * @deprecated This API will be decommissioned in November 2012 and all calls
13 * to it will return an error.
15 @Deprecated
16 public interface ConversionService {
17 /** Maximum bytes size of one conversion to be converted. */
18 public static final int CONVERSION_MAX_SIZE_BYTES = 2 * 1024 * 1024;
20 /** Maximum number of conversions allowed in one request. */
21 public static final int CONVERSION_MAX_NUM_PER_REQUEST = 10;
23 /**
24 * Runs a conversion.
26 * @param conversion the Conversion instance to run
27 * @return the ConversionResult instance
28 * @throws ConversionServiceException if the conversion fails with the reason
29 * specified in {@link ConversionErrorCode}
30 * @throws IllegalArgumentException if the input conversion is invalid
32 public ConversionResult convert(Conversion conversion);
34 /**
35 * Executes multiple conversions in one request to the conversion backend.
37 * @param conversions a collection of Conversion instances to run
38 * @return a collection of ConversionResult instances, one per Conversion
39 * in the same order
40 * @throws ConversionServiceException if the conversion fails with the reason
41 * specified in {@link ConversionErrorCode}
42 * @throws IllegalArgumentException if the input conversions are invalid
44 public List<ConversionResult> convert(List<Conversion> conversions);
46 /**
47 * Runs a conversion asynchronously.
49 * @param conversion the Conversion instance to run
50 * @return a future containing the ConversionResult instance;
51 * {@link Future#get} may throw {@link ConversionServiceException} if
52 * the conversion fails with the reason specified in
53 * {@link ConversionErrorCode}
54 * @throws IllegalArgumentException if the input conversion is invalid
56 public Future<ConversionResult> convertAsync(Conversion conversion);
58 /**
59 * Executes multiple conversions in one request to the conversion backend
60 * asynchronously.
62 * @param conversions a collection of Conversion instances to run
63 * @return a future containing a collection of ConversionResult instances,
64 * one per Conversion in the same order; {@link Future#get} may throw
65 * {@link ConversionServiceException} if the conversion fails with
66 * the reason specified in {@link ConversionErrorCode}
67 * @throws IllegalArgumentException if the input conversions are invalid
69 public Future<List<ConversionResult>> convertAsync(List<Conversion> conversions);