-
- 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 UnitremoveEventReceiver(String featureName)Removes events receive for the given feature. 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.
-
removeEventReceiver
abstract Unit removeEventReceiver(String featureName)
Removes events receive for the given feature.
- Parameters:
featureName- Feature name.
-
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).
-
-
-
-