public abstract class

Event

extends Object
java.lang.Object
   ↳ com.urbanairship.analytics.Event
Known Direct Subclasses

Class Overview

This abstract class encapsulates analytics events.

Summary

Nested Classes
@interface Event.Priority  
Constants
int HIGH_PRIORITY High priority event.
int LOW_PRIORITY Low priority event.
int NORMAL_PRIORITY Normal priority event.
Public Constructors
Event(long timeMS)
Constructor for Event.
Event()
Constructor for Event using the current time.
Public Methods
String getConnectionSubType()
Returns the connection subtype.
String getConnectionType()
Returns the connection type.
String getEventId()
Returns the UUID associated with the event.
int getPriority()
The event's send priority.
String getTime()
Returns the timestamp associated with the event.
abstract String getType()
The event type.
boolean isValid()
Validates the Event.
Protected Methods
String getCarrier()
Returns the current carrier.
abstract JsonMap getEventData()
Create the event data.
long getTimezone()
Returns the current time zone.
boolean isDaylightSavingsTime()
Indicates whether it is currently daylight savings time.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int HIGH_PRIORITY

High priority event.

Constant Value: 2 (0x00000002)

public static final int LOW_PRIORITY

Low priority event.

Constant Value: 0 (0x00000000)

public static final int NORMAL_PRIORITY

Normal priority event.

Constant Value: 1 (0x00000001)

Public Constructors

public Event (long timeMS)

Constructor for Event.

Parameters
timeMS The time of the event in milliseconds.

public Event ()

Constructor for Event using the current time.

Public Methods

public String getConnectionSubType ()

Returns the connection subtype.

Returns
  • The connection subtype as a String.

public String getConnectionType ()

Returns the connection type.

Returns
  • The connection type as a String.

public String getEventId ()

Returns the UUID associated with the event.

Returns
  • an Event id String.

public int getPriority ()

The event's send priority.

Returns
  • The event's send priority.

public String getTime ()

Returns the timestamp associated with the event.

Returns
  • Seconds from the epoch, as a String.

public abstract String getType ()

The event type.

Returns
  • The event type.

public boolean isValid ()

Validates the Event.

Returns
  • True if valid, false otherwise.

Protected Methods

protected String getCarrier ()

Returns the current carrier.

Returns
  • The carrier as a String.

protected abstract JsonMap getEventData ()

Create the event data.

Returns
  • The event data.

protected long getTimezone ()

Returns the current time zone.

Returns
  • The time zone as a long.

protected boolean isDaylightSavingsTime ()

Indicates whether it is currently daylight savings time.

Returns
  • true if it is currently daylight savings time, false otherwise.