Class LocalizationServiceProxy
java.lang.Object
org.somda.sdc.glue.consumer.localization.LocalizationServiceProxy
- All Implemented Interfaces:
LocalizationServiceAccess
Controller class that is responsible for invoking localization requests.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcachePrefetch(BigInteger version) Calls a synchronous cache prefetch of localized texts by provided version.voidcachePrefetch(BigInteger version, List<String> lang) Calls a synchronous cache prefetch of localized texts by provided version and languages.com.google.common.util.concurrent.ListenableFuture<org.somda.sdc.biceps.model.message.GetLocalizedTextResponse>getLocalizedText(org.somda.sdc.biceps.model.message.GetLocalizedText getLocalizedText) Invokes a localization service to get localized texts.com.google.common.util.concurrent.ListenableFuture<org.somda.sdc.biceps.model.message.GetSupportedLanguagesResponse>getSupportedLanguages(org.somda.sdc.biceps.model.message.GetSupportedLanguages getSupportedLanguages) Invokes a localization service to get supported languages.
-
Method Details
-
getLocalizedText
public com.google.common.util.concurrent.ListenableFuture<org.somda.sdc.biceps.model.message.GetLocalizedTextResponse> getLocalizedText(org.somda.sdc.biceps.model.message.GetLocalizedText getLocalizedText) Description copied from interface:LocalizationServiceAccessInvokes a localization service to get localized texts.If there is no localization service available, this function returns with a cancelled future.
- Specified by:
getLocalizedTextin interfaceLocalizationServiceAccess- Parameters:
getLocalizedText- the request to send to the localization service.- Returns:
- a future object that contains a list of localized texts.
-
getSupportedLanguages
public com.google.common.util.concurrent.ListenableFuture<org.somda.sdc.biceps.model.message.GetSupportedLanguagesResponse> getSupportedLanguages(org.somda.sdc.biceps.model.message.GetSupportedLanguages getSupportedLanguages) Description copied from interface:LocalizationServiceAccessInvokes a localization service to get supported languages.If there is no localization service available, this function returns with a cancelled future.
- Specified by:
getSupportedLanguagesin interfaceLocalizationServiceAccess- Parameters:
getSupportedLanguages- the request to get supported languages.- Returns:
- a future object that contains a list of supported languages.
-
cachePrefetch
Description copied from interface:LocalizationServiceAccessCalls a synchronous cache prefetch of localized texts by provided version.- Specified by:
cachePrefetchin interfaceLocalizationServiceAccess- Parameters:
version- - a version of localized texts to be included into cache.- Throws:
InvocationException- if localization service is not available or something goes wrong during data fetch.
-
cachePrefetch
Description copied from interface:LocalizationServiceAccessCalls a synchronous cache prefetch of localized texts by provided version and languages.- Specified by:
cachePrefetchin interfaceLocalizationServiceAccess- Parameters:
version- a version of localized texts to be included into cache.lang- optional list of languages to be included into cache. If languages list is not provided or is empty - all languages are fetched.- Throws:
InvocationException- if localization service is not available or something goes wrong during data fetch.
-