Package com.iizix.translate
Class AbstractTranslationRequest
java.lang.Object
com.iizix.translate.AbstractTranslationRequest
- All Implemented Interfaces:
- ITranslationRequest
The abstract translation request class.
- Author:
- Christopher Mindus
- Nested Class SummaryNested ClassesModifier and TypeClassDescription- protected static classClass for a RequestItem.
- Field SummaryFieldsModifier and TypeFieldDescription- protected final ArrayList<AbstractTranslationRequest.RequestItem>Request array.- protected final StringThe source language code, null for automatic detection.- protected final StringThe target language code.
- Constructor SummaryConstructorsModifierConstructorDescription- protected- AbstractTranslationRequest- (String sourceLanguageCode, String targetLanguageCode) Constructor.
- Method SummaryModifier and TypeMethodDescription- boolean- addRequest- (KString sourceText, ITranslationReply reply) Adds a requests to perform at the same time as the others.
- Field Details- requestsRequest array.
- sourceLanguageCodeThe source language code, null for automatic detection.
- targetLanguageCodeThe target language code.
 
- Constructor Details- AbstractTranslationRequestConstructor.- Parameters:
- sourceLanguageCode- The source language code, null for automatic detection.
- targetLanguageCode- The target language code.
 
 
- Method Details- addRequestAdds a requests to perform at the same time as the others. The amount of simultaneous requests depends on the size of the entire data transaction usually in UTF-8 bytes.- Specified by:
- addRequestin interface- ITranslationRequest
- Parameters:
- sourceText- The source text to translate.
- reply- The reply callback when translation completes.
- Returns:
- true for successfully added, false for no more room.