net.rim.pushsdk.push.stats
Class PushStats

java.lang.Object
  extended by net.rim.pushsdk.push.stats.PushStats
All Implemented Interfaces:
Serializable

public class PushStats
extends Object
implements Serializable

Represents push statistics for an application.

Author:
dstrelbytsky
See Also:
Serialized Form

Constructor Summary
PushStats()
          Constructs a default PushStats object.
PushStats(PushStats pushStats)
          Copy Constructor.
PushStats(String pushApplicationId, long runningPushCount, long runningContentSum, long dailyPushCount)
          Constructs a PushStats object for the specified push application with the provided running push count, running content sum, and daily push count.
 
Method Summary
 boolean equals(Object obj)
          Returns true if two push statistic objects are found to be equal and false otherwise.
 long getDailyPushCount()
          Gets the number of pushes during a day.
 Date getDailyPushCountDate()
          Gets the date for which the daily push count is calculated.
 String getPushApplicationId()
          Gets the id of the push application that this push statistic object corresponds to.
 long getRunningContentSum()
          Gets the total volume of content pushed since this value was reset.
 long getRunningPushCount()
          Gets the number of pushes since this value was reset.
 int hashCode()
          Returns the push statistic hash code.
 void setDailyPushCount(long dailyPushCount)
          Sets the number of pushes during a day.
 void setDailyPushCountDate(Date dailyPushCountDate)
          Sets the date for which the daily push count is calculated.
 void setPushApplicationId(String pushApplicationId)
          Sets the id of the push application that this push statistic object corresponds to.
 void setRunningContentSum(long runningContentSum)
          Sets the total volume of content pushed since this value was reset.
 void setRunningPushCount(long runningPushCount)
          Sets the number of pushes since this value was reset.
 String toString()
          Constructs a String with all attributes in name = value format.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PushStats

public PushStats(PushStats pushStats)
Copy Constructor.

Parameters:
pushStats - a PushStats object

PushStats

public PushStats()
Constructs a default PushStats object.


PushStats

public PushStats(String pushApplicationId,
                 long runningPushCount,
                 long runningContentSum,
                 long dailyPushCount)
Constructs a PushStats object for the specified push application with the provided running push count, running content sum, and daily push count.

Parameters:
pushApplicationId - Id of the push application that the constructed push statistic object corresponds to
runningPushCount - number of pushes since this value was reset. If one push contains N addresses, the runningPushCount will be equal N.
runningContentSum - total volume of content pushed since this value was reset. If J bytes of content was sent to N devices, the runningContentSum will be equal J * N.
dailyPushCount - number of pushes during a day. If one push contains N addresses, the dailyPushCount will be equal N.
Method Detail

getPushApplicationId

public String getPushApplicationId()
Gets the id of the push application that this push statistic object corresponds to.

Returns:
the id of the push application

setPushApplicationId

public void setPushApplicationId(String pushApplicationId)
Sets the id of the push application that this push statistic object corresponds to.

Parameters:
pushApplicationId - the id of the push application

getRunningPushCount

public long getRunningPushCount()
Gets the number of pushes since this value was reset. If there was one push containing N addresses, the returned runningPushCount will be N.

Returns:
the running push count

setRunningPushCount

public void setRunningPushCount(long runningPushCount)
Sets the number of pushes since this value was reset. If there was one push containing N addresses, the runningPushCount passed to this method should be N.

Parameters:
runningPushCount - running push count

getRunningContentSum

public long getRunningContentSum()
Gets the total volume of content pushed since this value was reset. If J bytes of content was sent to N devices, the returned runningContentSum will be J * N

Returns:
the running content sum

setRunningContentSum

public void setRunningContentSum(long runningContentSum)
Sets the total volume of content pushed since this value was reset. If J bytes of content was sent to N devices, the runningContentSum passed to the method should be J * N

Parameters:
runningContentSum - the running content sum

getDailyPushCount

public long getDailyPushCount()
Gets the number of pushes during a day. If one push contains N addresses, the returned dailyPushCount will be N.

Returns:
daily push count

setDailyPushCount

public void setDailyPushCount(long dailyPushCount)
Sets the number of pushes during a day. If one push contains N addresses, the dailyPushCount passed to the method should be N.

Parameters:
dailyPushCount - the daily push count

getDailyPushCountDate

public Date getDailyPushCountDate()
Gets the date for which the daily push count is calculated.

Returns:
the date for which the daily push count is calculated

setDailyPushCountDate

public void setDailyPushCountDate(Date dailyPushCountDate)
Sets the date for which the daily push count is calculated.

Parameters:
dailyPushCountDate - the date for which the daily push count is calculated

hashCode

public int hashCode()
Returns the push statistic hash code.

Overrides:
hashCode in class Object
Returns:
the push statistic has code

equals

public boolean equals(Object obj)
Returns true if two push statistic objects are found to be equal and false otherwise.

Overrides:
equals in class Object
Returns:
whether two push statistic are equal

toString

public String toString()
Constructs a String with all attributes in name = value format.

Overrides:
toString in class Object
Returns:
a String representation of this object.


Copyright © 2011 Research In Motion. All Rights Reserved.