Class Event



  • public class Event
    extends java.lang.Object
    Model for an Outbound event.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Event(java.lang.String name)
      Create an event without any properties
      Event(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> properties)
      Create an Outbound event with properites
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getName()
      Get the name of the event
      void setProperty(java.lang.String key, java.lang.Object value)
      Add a property to the event.
      void setTimestamp(long timestamp)
      Set the timestamp of when the event occurred.
      void setUserId(java.lang.String userId)
      Set the user id of the user who commmitted the event.
      void setUserId(java.lang.String userId, boolean isAnon)
      Set the user id of the user who commmitted the event.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 event
        properties - 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: