Package com.transifex.common
Interface CDSHandler.FetchCallback
- Enclosing class:
- CDSHandler
public static interface CDSHandler.FetchCallback
The callback to get the results of
CDSHandler.fetchTranslations(String, Set, FetchCallback)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Called once if an exception occurs during setup.void
onFetchingTranslations
(String[] localeCodes) Called once before initiating the connection to CDS.void
onTranslationFetched
(InputStream inputStream, String localeCode, Exception exception) Called for each locale when a connection with the CDS is established.
-
Method Details
-
onFetchingTranslations
Called once before initiating the connection to CDS. You can get the locales that will be fetched. -
onTranslationFetched
void onTranslationFetched(@Nullable InputStream inputStream, @NonNull String localeCode, @Nullable Exception exception) Called for each locale when a connection with the CDS is established. The implementation should consume the provided input stream.If an error occurs when establishing the connection, the
exception
will be supplied and the input stream will benull
. -
onFailure
Called once if an exception occurs during setup.
-