Package io.outbound.sdk
Class Event
- java.lang.Object
-
- io.outbound.sdk.Event
-
public class Event extends java.lang.ObjectModel for an Outbound event.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.StringgetName()Get the name of the eventvoidsetProperty(java.lang.String key, java.lang.Object value)Add a property to the event.voidsetTimestamp(long timestamp)Set the timestamp of when the event occurred.voidsetUserId(java.lang.String userId)Set the user id of the user who commmitted the event.voidsetUserId(java.lang.String userId, boolean isAnon)Set the user id of the user who commmitted the event.
-
-
-
Constructor Detail
-
Event
public Event(java.lang.String name)
Create an event without any properties- Parameters:
name- name of the event
-
Event
public Event(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> properties)Create an Outbound event with properites- Parameters:
name- name of the eventproperties- properties relating to the event
-
-
Method Detail
-
setUserId
public void setUserId(java.lang.String userId)
Set the user id of the user who commmitted the event. This is set automatically by the SDK.- Parameters:
userId-
-
setUserId
public void setUserId(java.lang.String userId, boolean isAnon)Set the user id of the user who commmitted the event. This is set automatically by the SDK.- Parameters:
userId-isAnon-
-
setProperty
public void setProperty(java.lang.String key, java.lang.Object value)Add a property to the event.- Parameters:
key-value-
-
setTimestamp
public void setTimestamp(long timestamp)
Set the timestamp of when the event occurred. This is set automatically in the constructor but can be overridden using this method.- Parameters:
timestamp- unix timestamp of when the event occurred
-
getName
public java.lang.String getName()
Get the name of the event- Returns:
-
-