-
- All Implemented Interfaces:
-
com.brightcove.player.analytics.IAnalyticsHandler
,com.brightcove.player.network.IHandler
public class DefaultAnalyticsHandler implements IAnalyticsHandler
-
-
Field Summary
Fields Modifier and Type Field Description private AtomicReference<IAnalyticsHandler.ProcessListener>
processListener
-
Method Summary
Modifier and Type Method Description DefaultAnalyticsHandler
setProcessListener(@Nullable() IAnalyticsHandler.ProcessListener listener)
Sets the listener that can receive callback notifications from this instancebefore and after processing an event. static DefaultAnalyticsHandler
getInstance(@NonNull() Context context)
Provides reference to the single instance of DefaultAnalyticsHandler. void
onAttached()
This method will be invoked when the handler is added to a network client. void
onRemoved()
This method will be invoked when the handler is removed from a network client. void
onAnalyticsEvent(@NonNull() AnalyticsEvent event, @Nullable() IAnalyticsErrorListener errorHandler)
This method will be called by the AnalyticsClient, when an analytics event is receivedfrom the application. void
onNetworkEntitlementChanged(int type, boolean enabled)
This method will be called when the entitlement for specific network has been changed. -
-
Method Detail
-
setProcessListener
DefaultAnalyticsHandler setProcessListener(@Nullable() IAnalyticsHandler.ProcessListener listener)
Sets the listener that can receive callback notifications from this instancebefore and after processing an event.
- Parameters:
listener
- null or reference to a listener.
-
getInstance
static DefaultAnalyticsHandler getInstance(@NonNull() Context context)
Provides reference to the single instance of DefaultAnalyticsHandler.
- Parameters:
context
- context of the host activity or application.
-
onAttached
void onAttached()
This method will be invoked when the handler is added to a network client.
-
onRemoved
void onRemoved()
This method will be invoked when the handler is removed from a network client.
-
onAnalyticsEvent
void onAnalyticsEvent(@NonNull() AnalyticsEvent event, @Nullable() IAnalyticsErrorListener errorHandler)
This method will be called by the AnalyticsClient, when an analytics event is receivedfrom the application.
- Parameters:
event
- the analytics client.errorHandler
- reference to analytics error listener, if any.
-
onNetworkEntitlementChanged
void onNetworkEntitlementChanged(int type, boolean enabled)
This method will be called when the entitlement for specific network has been changed.
- Parameters:
type
- the network typeenabled
- true if the network is entitled for analytics transmission, otherwise false.
-
-
-
-