public class

DefaultOptimizelyEventListener

extends Object
implements OptimizelyEventListener
java.lang.Object
   ↳ com.optimizely.integration.DefaultOptimizelyEventListener

Class Overview

Base class for event listeners

Summary

Public Constructors
DefaultOptimizelyEventListener()
Public Methods
void onGoalTriggered(String description, List<OptimizelyExperimentData> affectedExperiments)
Notification that a goal has been triggered.
void onMessage(String source, String messageType, Bundle payload)
Called whenever a core component or plugin sends a message that is not covered by the functions above.
void onOptimizelyDataFileLoaded()
Notification that will fire whenever Optimizely loads a new configuration file.
void onOptimizelyEditorEnabled()
Notification that Optimizely is now running in edit mode (though not necessarily connected to the online editor)
void onOptimizelyExperimentVisited(OptimizelyExperimentData experimentState)
Notification that is fired whenever the user's experience has been affected by an experiment.
void onOptimizelyFailedToStart(String errorMessage)
Notification that Optimizely was unable to initialize along with a debugging message.
void onOptimizelyRestarting(OptimizelyRunningMode currentRunningMode, OptimizelyRunningMode nextRunningMode)
Called whenever Optimizely is restarting A restart occurs when entering edit mode, entering preview mode, and when changing preview configuration.
void onOptimizelyStarted()
Notification that Optimizely has successfully initialized and is now running.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.optimizely.integration.OptimizelyEventListener

Public Constructors

public DefaultOptimizelyEventListener ()

Public Methods

public void onGoalTriggered (String description, List<OptimizelyExperimentData> affectedExperiments)

Notification that a goal has been triggered.

Parameters
description A description of the goal event
affectedExperiments the experiments that are active and tracking this goal

public void onMessage (String source, String messageType, Bundle payload)

Called whenever a core component or plugin sends a message that is not covered by the functions above.

Parameters
source ID of the plugin or core component that sent the message
messageType type of the message
payload payload of extras bundled into the message

public void onOptimizelyDataFileLoaded ()

Notification that will fire whenever Optimizely loads a new configuration file.

public void onOptimizelyEditorEnabled ()

Notification that Optimizely is now running in edit mode (though not necessarily connected to the online editor)

public void onOptimizelyExperimentVisited (OptimizelyExperimentData experimentState)

Notification that is fired whenever the user's experience has been affected by an experiment. This means that: a live variable has been evaluated, a code block has been evaluated, or a visual change has been seen by the user.

Parameters
experimentState the current running state of the experiment.

public void onOptimizelyFailedToStart (String errorMessage)

Notification that Optimizely was unable to initialize along with a debugging message. This notification will be sent to new listeners as they register if Optimizely has already failed to start.

Parameters
errorMessage the cause of the failure to start.

public void onOptimizelyRestarting (OptimizelyRunningMode currentRunningMode, OptimizelyRunningMode nextRunningMode)

Called whenever Optimizely is restarting A restart occurs when entering edit mode, entering preview mode, and when changing preview configuration. This gives users a chance to do things such as restarting services that rely on the values of live variables.

Parameters
currentRunningMode the running mode Optimizely is currently in.
nextRunningMode the next running mode Optimizely will be in.

public void onOptimizelyStarted ()

Notification that Optimizely has successfully initialized and is now running. This notification will be sent to new listeners as they register if Optimizely is already running.