|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object AbstractLocalRpcService com.google.appengine.api.conversion.dev.LocalConversionService
@ServiceProvider(value=) public final class LocalConversionService
A stub for the ConversionService API for offline development. Since there's no obvious way to simulate the conversion service, we bundle "canonical" files under the static subdirectory for each target conversion type and return them all the time regardless of the input. For each conversion, we only return one asset here.
Field Summary | |
---|---|
static |
CONVERTED_FILES_STUB
Names of "canonical" files for each target conversion type. |
static java.lang.String |
PACKAGE
The package name of this service. |
Constructor Summary | |
---|---|
LocalConversionService()
|
Method Summary | |
---|---|
ConversionResponse |
convert(Status status,
ConversionRequest request)
|
java.lang.String |
getPackage()
|
void |
init(LocalServiceContext context,
java.util.Map<java.lang.String,java.lang.String> properties)
|
static byte[] |
readStubFile(java.lang.String outputMimeType)
Read the data out of the stub file for the specified output mime type. |
void |
start()
|
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static finalCONVERTED_FILES_STUB
public static final java.lang.String PACKAGE
Constructor Detail |
---|
public LocalConversionService()
Method Detail |
---|
public java.lang.String getPackage()
public void init(LocalServiceContext context, java.util.Map<java.lang.String,java.lang.String> properties)
public void start()
public void stop()
public static byte[] readStubFile(java.lang.String outputMimeType) throws com.google.apphosting.api.ApiProxy.ApplicationException, java.io.IOException
outputMimeType
- The output mime type.
ApiProxy.ApplicationException
- if failed to read the data out of
the stub file.
java.io.IOException
- if failed to close the InputStream to read stub file.public ConversionResponse convert(Status status, ConversionRequest request) throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |