Class RequestContentType
- java.lang.Object
-
- aero.panasonic.inflight.services.contentdiscovery.v1.RequestBase<TypeList>
-
- aero.panasonic.inflight.services.contentdiscovery.v1.RequestContentType
-
public class RequestContentType extends RequestBase<TypeList>
The Request Content Type class returns all content types media, games or ebooksfor the specifiedRootContentType.
The content type describes the nature of content. For example, theRootContentType.MEDIAcan have content types ofContentType.Type.MEDIA_VIDEO_MOVIE.
The list of content types are defined inContentType.Type
In addition, the list can be filtered by seat class.
This class is returned byContentDiscovery.getContentTypeRequest()()} (String)}. It has a method to execute a request synchronously and asynchronously and also provides a set of Set methods for the parameters.
-
-
Field Summary
-
Fields inherited from class aero.panasonic.inflight.services.contentdiscovery.v1.RequestBase
mLangCode, mSeatClass
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecuteAsync(ContentDiscovery.Listener<TypeList> listener)Gets a list of all content types for the specified content name.java.util.List<TypeList>executeSync()Gets a list of all content types for the specified content name.JSONObjectgetSocketPayload()voidsetRootContentType(java.lang.String rootContentType)Specifies the root content type to filter result.voidsetSeatClass(java.lang.String seatClass)Specifies the seat class, such as first or business.-
Methods inherited from class aero.panasonic.inflight.services.contentdiscovery.v1.RequestBase
cancel, getRequestId, setRequestCancelling
-
-
-
-
Method Detail
-
setRootContentType
public void setRootContentType(java.lang.String rootContentType)
Specifies the root content type to filter result. Examples: media, games or ebooks.
If not called, contents for all types are returned.- Parameters:
rootContentType- Only accepts strings provided byRootContentType, such as media, games or ebooks.
-
setSeatClass
public void setSeatClass(java.lang.String seatClass)
Specifies the seat class, such as first or business.
If not called, SeatClass.All will be used.- Parameters:
seatClass- Only accepts strings provided bySeatClass.
-
executeSync
public java.util.List<TypeList> executeSync() throws ContentDiscovery.Exception
Gets a list of all content types for the specified content name. For example, the content name 'media' can have content types of 'video.movie' or 'video.music'.
This call is synchronous.- Returns:
- a list of TypeList.
- Throws:
ContentDiscovery.Exception- if error occurs.
-
executeAsync
public void executeAsync(ContentDiscovery.Listener<TypeList> listener)
Gets a list of all content types for the specified content name. For example, the content name 'media' can have content types of 'video.movie' or 'video.music'.
This call is asynchronous.- Parameters:
listener- Data are passed back in the listener.If data retrieved successfully,ContentDiscovery.Listener.onDataReceived(List, RequestBase)is called. If error happens,ContentDiscovery.Listener.onError(ContentDiscovery.Error, RequestBase)is called.
-
getSocketPayload
public JSONObject getSocketPayload()
- Specified by:
getSocketPayloadin classRequestBase<TypeList>
-
-