Class VimondComponent

java.lang.Object
com.castlabs.analytics.AnalyticsSession
com.castlabs.sdk.vimond.VimondComponent
All Implemented Interfaces:
IAnalyticsSession, PlayerControllerPlugin.Component, PlayerListener, VimondCallback

public class VimondComponent extends AnalyticsSession implements VimondCallback, PlayerListener
Main Vimond Plugin interaction point.

To get an instance of the component, use the PlayerController.getComponent(Class).

The component can be used to register a VimondCallback. In addition, a new authentication token can be provided at runtime via setToken(String).


     VimondComponent vimond = playerController.getComponent(VimondComponent.class);
     vimond.setRaiseErrorOnUnreachableHost(true); // Fail if host unreachable
     vimond.setRaiseErrorOnInvalidStatusCode(true); // Fail if bad http status code is received
     vimond.setCallback(new VimondCallback() {
                @Override
                public void onVimondResponse(int httpStatusCode,
                                             @Nullable Map<String, List<String>> headers,
                                             @Nullable String responseBody) {
                     Log.d(TAG, "Vimond response (" + httpStatusCode + ") " + responseBody);
                }
     });
 
Since:
4.2.34