Class GetPlaylistTask

  • All Implemented Interfaces:
    Component

    @Emits(events={})
    @ListensFor(events={})
    public class GetPlaylistTask
    extends android.os.AsyncTask<java.net.URI,​java.lang.Void,​com.brightcove.player.edge.EdgeTaskResult<T>>
    implements Component
    • Field Detail

      • baseURL

        @NonNull
        protected java.lang.String baseURL
      • account

        @NonNull
        protected java.lang.String account
      • uri

        protected java.net.URI uri
      • errors

        protected java.util.List<java.lang.String> errors
    • Constructor Detail

      • GetPlaylistTask

        @Deprecated
        public GetPlaylistTask​(@NonNull
                               EventEmitter eventEmitter,
                               @NonNull
                               java.lang.String baseURL,
                               @Nullable
                               java.util.Map<java.lang.String,​java.lang.String> options,
                               @Nullable
                               java.util.Map<java.lang.String,​java.lang.String> queryParameters,
                               @NonNull
                               java.lang.String account,
                               @NonNull
                               java.lang.String policy)
      • GetPlaylistTask

        public GetPlaylistTask​(@NonNull
                               EventEmitter eventEmitter,
                               @NonNull
                               java.lang.String baseURL,
                               @NonNull
                               HttpRequestConfig httpRequestConfig,
                               @NonNull
                               java.lang.String account,
                               @NonNull
                               java.lang.String policy)
      • GetPlaylistTask

        public GetPlaylistTask​(@NonNull
                               EventEmitter eventEmitter,
                               @NonNull
                               java.lang.String baseURL,
                               @NonNull
                               HttpRequestConfig httpRequestConfig,
                               @NonNull
                               java.lang.String account)
    • Method Detail

      • getById

        public void getById​(java.lang.String playlistId,
                            PlaylistListener playlistListener)
      • getByReferenceId

        public void getByReferenceId​(java.lang.String referenceId,
                                     PlaylistListener playlistListener)
      • onPostExecute

        protected void onPostExecute​(com.brightcove.player.edge.EdgeTaskResult<Playlist> result)
        Overrides:
        onPostExecute in class android.os.AsyncTask<java.net.URI,​java.lang.Void,​com.brightcove.player.edge.EdgeTaskResult<Playlist>>
      • processData

        protected Playlist processData​(@NonNull
                                       org.json.JSONObject data)
                                throws org.json.JSONException,
                                       VideoParseException
        Parses the JSON object to return the typed Object. This method is called in the AsyncTask.doInBackground(URI...) method.
        Parameters:
        data - the Json object returned from the response
        Returns:
        the typed object
        Throws:
        org.json.JSONException
        VideoParseException
      • doInBackground

        @NonNull
        protected com.brightcove.player.edge.EdgeTaskResult<T> doInBackground​(java.net.URI... params)
        Specified by:
        doInBackground in class android.os.AsyncTask<java.net.URI,​java.lang.Void,​com.brightcove.player.edge.EdgeTaskResult<T>>
      • createURI

        protected java.net.URI createURI​(java.lang.String... params)
                                  throws java.net.URISyntaxException
        Creates a URI object with the baseURL passed in the constructor and appends the String params to the Url. For example: baseURL/param1/param2.../paramN

        If the HttpRequestConfig.getQueryParameters() map is not empty, it will also append its values to the url. For example: baseUrl?key1=value1&key2=value2&...&keyN=valueN baseUrl/param1/param2.../paramN?key1=value1&key2=value2&...&keyN=valueN

        Parameters:
        params - the params
        Returns:
        the uri
        Throws:
        java.net.URISyntaxException - the uri syntax exception