Package com.mixpanel.mixpanelapi
Class ClientDelivery
- java.lang.Object
-
- com.mixpanel.mixpanelapi.ClientDelivery
-
public class ClientDelivery extends Object
A ClientDelivery can be used to send multiple messages to Mixpanel.
-
-
Constructor Summary
Constructors Constructor Description ClientDelivery()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMessage(org.json.JSONObject message)Adds an individual message to this delivery.booleanisValidMessage(org.json.JSONObject message)Returns true if the given JSONObject appears to be a valid Mixpanel message, created with #MessageBuilder.
-
-
-
Method Detail
-
addMessage
public void addMessage(org.json.JSONObject message)
Adds an individual message to this delivery. Messages to Mixpanel are often more efficient when sent in batches.- Parameters:
message- a JSONObject produced by #MessageBuilder. Arguments not from MessageBuilder will throw an exception.- Throws:
MixpanelMessageException- if the given JSONObject is not formatted appropriately.- See Also:
MessageBuilder
-
isValidMessage
public boolean isValidMessage(org.json.JSONObject message)
Returns true if the given JSONObject appears to be a valid Mixpanel message, created with #MessageBuilder.- Parameters:
message- a JSONObject to be tested- Returns:
- true if the argument appears to be a Mixpanel message
-
-