Class RequestLanguage
- java.lang.Object
-
- aero.panasonic.inflight.services.contentdiscovery.v1.RequestBase<Language>
-
- aero.panasonic.inflight.services.contentdiscovery.v1.RequestLanguage
-
public class RequestLanguage extends RequestBase<Language>
The Language class returns the languages of the translated contents.
Languages contains:
- Language code – displays based on the 3 letter ISO 639-3 language code. For example, eng is English, deu is German and fre is French.
- Region – displays based on ISO 3166-1 alpha -2. For example, the region designator for the United States is US, United Kingdom is GB, Australia is AU, France is FR and Canada is CA.
- Script -- displays based on ISO 15924-1. The script is the name of the writing system. Each script or set of graphic characters is given both a four letter code and a numeric code. For example, the script for Greek is Grek 200 and Japanese is Jpan 413.
This class is returned byContentDiscovery.getLanguagesRequest()()} (String)}.
It has method to execute request synchronously and asynchronously and also provides a set of Set methods for parameters.
-
-
Field Summary
-
Fields inherited from class aero.panasonic.inflight.services.contentdiscovery.v1.RequestBase
mLangCode, mSeatClass
-
-
Constructor Summary
Constructors Constructor Description RequestLanguage(aero.panasonic.inflight.services.contentdiscovery.v1.ContentdiscoveryControllerBase controller)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecuteAsync(ContentDiscovery.Listener<Language> listener)Returns ISO 639-3 language codes asynchronously.java.util.List<Language>executeSync()Gets ISO 639-3 language codes asynchronously.java.lang.StringgetContentType()JSONObjectgetSocketPayload()voidsetContentType(java.lang.String contentType)-
Methods inherited from class aero.panasonic.inflight.services.contentdiscovery.v1.RequestBase
cancel, getRequestId, setRequestCancelling
-
-
-
-
Method Detail
-
getContentType
public java.lang.String getContentType()
-
setContentType
public void setContentType(java.lang.String contentType)
-
executeSync
public java.util.List<Language> executeSync() throws ContentDiscovery.Exception
Gets ISO 639-3 language codes asynchronously.
Example: eng is English, deu is German and fre is French.- Returns:
- a list of language codes.
- Throws:
ContentDiscovery.Exception- if error occurs.
-
executeAsync
public void executeAsync(ContentDiscovery.Listener<Language> listener)
Returns ISO 639-3 language codes asynchronously.
Example: eng is English, deu is German and fre is French.- Parameters:
listener- Data is passed back in the listener. If data is retrieved successfully,ContentDiscovery.Listener.onDataReceived(List, RequestBase)is called.
If error occurs,ContentDiscovery.Listener.onError(ContentDiscovery.Error, RequestBase)is called.
-
getSocketPayload
public JSONObject getSocketPayload()
- Specified by:
getSocketPayloadin classRequestBase<Language>
-
-