Class Plugin
java.lang.Object
com.launchdarkly.sdk.android.integrations.Plugin
Abstract class that you can extend to create a plugin to the LaunchDarkly SDK.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetHooks
(EnvironmentMetadata metadata) Gets a list of hooks that the plugin wants to register.abstract PluginMetadata
abstract void
register
(LDClient client, EnvironmentMetadata metadata) Registers the plugin with the SDK.
-
Constructor Details
-
Plugin
public Plugin()
-
-
Method Details
-
getMetadata
- Returns:
- the
PluginMetadata
that gives details about the plugin.
-
register
Registers the plugin with the SDK. Called once during SDK initialization. The SDK initialization will typically not have been completed at this point, so the plugin should take appropriate actions to ensure the SDK is ready before sending track events or evaluating flags. Implementations should be prepared for this method to be invoked multiple times in case the SDK is configured with multiple environments. Use the metadata to distinguish environments.- Parameters:
client
- for the plugin to usemetadata
- metadata about the environment where the plugin is running.
-
getHooks
Gets a list of hooks that the plugin wants to register. This method will be called once during SDK initialization before the register method is called. If the plugin does not need to register any hooks, this method doesn't need to be implemented. Implementations should be prepared for this method to be invoked multiple times in case the SDK is configured with multiple environments. Use the metadata to distinguish environments.- Parameters:
metadata
- metadata about the environment where the plugin is running.- Returns:
-