com.mixpanel.mixpanelapi
Class ClientDelivery

java.lang.Object
  extended by com.mixpanel.mixpanelapi.ClientDelivery

public class ClientDelivery
extends Object

A ClientDelivery can be used to send multiple messages to Mixpanel.


Constructor Summary
ClientDelivery()
           
 
Method Summary
 void addMessage(org.json.JSONObject message)
          Adds an individual message to this delivery.
 boolean isValidMessage(org.json.JSONObject message)
          Returns true if the given JSONObject appears to be a valid Mixpanel message, created with #MessageBuilder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientDelivery

public ClientDelivery()
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


Copyright © 2014. All Rights Reserved.