cn.com.mma.mobile.tracking.api
Class ConnectionQueue

java.lang.Object
  extended by cn.com.mma.mobile.tracking.api.ConnectionQueue

public class ConnectionQueue
extends java.lang.Object

消息发送类

Author:
lincoln

Method Summary
 void clear()
          停止正在发送消息的线程,并清除正确和错误SharedPreferenced中存储的数据
 void clearErrorList()
          清除错误SharedPreferenced中存储的数据
 void initPreferences(Context context)
          初始化SharedPreferences,包括存储正常信息和错误信息两种
 void recordEvents(SendEvent sendEvent)
          拼装参数,并发送消息
 void setParams(java.util.Map<java.lang.String,java.lang.String> params)
          设置参数
 void stop()
          停止正在发送消息的线程
 void tick()
          开启两个进程发送消息,如果发送消息出现错误,从正常SharedPreferenced中删除消息,添加到错误的SharedPreferenced中
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

initPreferences

public void initPreferences(Context context)
初始化SharedPreferences,包括存储正常信息和错误信息两种

Parameters:
context -

recordEvents

public void recordEvents(SendEvent sendEvent)
拼装参数,并发送消息

Parameters:
sendEvent -

stop

public void stop()
停止正在发送消息的线程


clear

public void clear()
停止正在发送消息的线程,并清除正确和错误SharedPreferenced中存储的数据


clearErrorList

public void clearErrorList()
清除错误SharedPreferenced中存储的数据


tick

public void tick()
开启两个进程发送消息,如果发送消息出现错误,从正常SharedPreferenced中删除消息,添加到错误的SharedPreferenced中


setParams

public void setParams(java.util.Map<java.lang.String,java.lang.String> params)
设置参数

Parameters:
params -