-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor so that any java 8 or later can use lambdas for Activate and… (
#175) * refactor so that any java 8 or later can use lambdas for Activate and Track listeners. * make some updates according to mike's comments * add some unit tests to up code coverage
- Loading branch information
1 parent
be515ba
commit 00c2312
Showing
11 changed files
with
206 additions
and
616 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...i/src/main/java/com/optimizely/ab/notification/ActivateNotificationListenerInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.optimizely.ab.notification; | ||
|
||
import com.optimizely.ab.config.Experiment; | ||
import com.optimizely.ab.config.Variation; | ||
import com.optimizely.ab.event.LogEvent; | ||
|
||
import javax.annotation.Nonnull; | ||
import java.util.Map; | ||
|
||
public interface ActivateNotificationListenerInterface { | ||
/** | ||
* onActivate called when an activate was triggered | ||
* @param experiment - The experiment object being activated. | ||
* @param userId - The userId passed into activate. | ||
* @param attributes - The filtered attribute list passed into activate | ||
* @param variation - The variation that was returned from activate. | ||
* @param event - The impression event that was triggered. | ||
*/ | ||
public void onActivate(@Nonnull Experiment experiment, | ||
@Nonnull String userId, | ||
@Nonnull Map<String, String> attributes, | ||
@Nonnull Variation variation, | ||
@Nonnull LogEvent event) ; | ||
|
||
} |
117 changes: 0 additions & 117 deletions
117
core-api/src/main/java/com/optimizely/ab/notification/NotificationBroadcaster.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.