Interface ITranslationRequest

  • All Known Implementing Classes:
    AbstractTranslationRequest

    public interface ITranslationRequest
    The translation request can hold one or several translation operations in the same source and target language. The Translator decides if it can add other operations to the instance or not.
    Author:
    Christopher Mindus
    • Method Detail

      • addRequest

        boolean addRequest​(KString sourceText,
                           ITranslationReply reply)
        Adds 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.
        Parameters:
        sourceText - The source text to translate.
        reply - The reply callback when translation completes.
        Returns:
        true for successfully added, false for no more room.