Class Event.Custom
java.lang.Object
com.launchdarkly.sdk.server.interfaces.Event
com.launchdarkly.sdk.server.interfaces.Event.Custom
- Enclosing class:
- Event
public static final class Event.Custom extends Event
A custom event created with
LDClientInterface.track(String, LDUser)
or one of its overloads.-
Nested Class Summary
Nested classes/interfaces inherited from class com.launchdarkly.sdk.server.interfaces.Event
Event.Custom, Event.FeatureRequest, Event.Identify, Event.Index
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description LDValue
getData()
The custom data associated with the event, if any.java.lang.String
getKey()
The custom event key.java.lang.Double
getMetricValue()
The numeric metric value associated with the event, if any.
-
Constructor Details
-
Custom
public Custom(long timestamp, java.lang.String key, LDUser user, LDValue data, java.lang.Double metricValue)Constructs a custom event.- Parameters:
timestamp
- the timestamp in millisecondskey
- the event keyuser
- the user associated with the eventdata
- custom data if any (null is the same asLDValue.ofNull()
)metricValue
- custom metric value if any- Since:
- 4.8.0
-
-
Method Details
-
getKey
public java.lang.String getKey()The custom event key.- Returns:
- the event key
-
getData
The custom data associated with the event, if any.- Returns:
- the event data (null is equivalent to
LDValue.ofNull()
)
-
getMetricValue
public java.lang.Double getMetricValue()The numeric metric value associated with the event, if any.- Returns:
- the metric value or null
-