-
- All Implemented Interfaces:
-
com.datadog.android.api.SdkCore
public interface FeatureSdkCore implements SdkCore
Extension of SdkCore containing the necessary methods for the features development.
SDK core is always guaranteed to implement this interface.
-
-
Method Summary
Modifier and Type Method Description abstract UnitregisterFeature(Feature feature)Registers a feature to this instance of the Datadog SDK. abstract FeatureScopegetFeature(String featureName)Retrieves a registered feature. abstract UnitupdateFeatureContext(String featureName, Function1<Map<String, Object>, Unit> updateCallback)Updates the context if exists with the new entries. abstract Map<String, Object>getFeatureContext(String featureName)Retrieves the context for the particular feature. abstract UnitsetEventReceiver(String featureName, FeatureEventReceiver receiver)Sets event receiver for the given feature. abstract UnitsetContextUpdateReceiver(String featureName, FeatureContextUpdateReceiver listener)Sets context update receiver for the given feature. abstract UnitremoveContextUpdateReceiver(String featureName, FeatureContextUpdateReceiver listener)Removes context update listener for the given feature. abstract UnitremoveEventReceiver(String featureName)Removes events receive for the given feature. abstract ExecutorServicecreateSingleThreadExecutorService(String executorContext)Returns a new single thread ExecutorService, set up with backpressure and internal monitoring. abstract ScheduledExecutorServicecreateScheduledExecutorService(String executorContext)Returns a new ScheduledExecutorService, set up with internal monitoring. abstract InternalLoggergetInternalLogger()Logger for the internal SDK purposes. abstract StringgetName()Name of the current SDK instance. abstract TimeInfogetTime()The current time (both device and server). abstract StringgetService()Name of the service (given during the SDK initialization, otherwise package name is used). -
-
Method Detail
-
registerFeature
abstract Unit registerFeature(Feature feature)
Registers a feature to this instance of the Datadog SDK.
- Parameters:
feature- the feature to be registered.
-
getFeature
abstract FeatureScope getFeature(String featureName)
Retrieves a registered feature.
- Parameters:
featureName- the name of the feature to retrieve
-
updateFeatureContext
abstract Unit updateFeatureContext(String featureName, Function1<Map<String, Object>, Unit> updateCallback)
Updates the context if exists with the new entries. If there is no context yet for the provided featureName, a new one will be created.
- Parameters:
featureName- Feature name.updateCallback- Provides current feature context for the update.
-
getFeatureContext
abstract Map<String, Object> getFeatureContext(String featureName)
Retrieves the context for the particular feature.
- Parameters:
featureName- Feature name.
-
setEventReceiver
abstract Unit setEventReceiver(String featureName, FeatureEventReceiver receiver)
Sets event receiver for the given feature.
- Parameters:
featureName- Feature name.receiver- Event receiver.
-
setContextUpdateReceiver
abstract Unit setContextUpdateReceiver(String featureName, FeatureContextUpdateReceiver listener)
Sets context update receiver for the given feature.
- Parameters:
featureName- Feature name.listener- Listener to remove.
-
removeContextUpdateReceiver
abstract Unit removeContextUpdateReceiver(String featureName, FeatureContextUpdateReceiver listener)
Removes context update listener for the given feature.
- Parameters:
featureName- Feature name.listener- Listener to remove.
-
removeEventReceiver
abstract Unit removeEventReceiver(String featureName)
Removes events receive for the given feature.
- Parameters:
featureName- Feature name.
-
createSingleThreadExecutorService
abstract ExecutorService createSingleThreadExecutorService(String executorContext)
Returns a new single thread ExecutorService, set up with backpressure and internal monitoring.
- Parameters:
executorContext- Context to be used for logging and naming threads running on this executor.
-
createScheduledExecutorService
abstract ScheduledExecutorService createScheduledExecutorService(String executorContext)
Returns a new ScheduledExecutorService, set up with internal monitoring. It will use a default of one thread and can spawn at most as many thread as there are CPU cores.
- Parameters:
executorContext- Context to be used for logging and naming threads running on this executor.
-
getInternalLogger
abstract InternalLogger getInternalLogger()
Logger for the internal SDK purposes.
-
getService
abstract String getService()
Name of the service (given during the SDK initialization, otherwise package name is used).
-
-
-
-