com.atlassian.mywork.rest
Class JsonCount

java.lang.Object
  extended by com.atlassian.mywork.rest.JsonCount

public class JsonCount
extends java.lang.Object

This class contains the number of unseen notifications and a minimum polling period.


Constructor Summary
JsonCount(int count, int timeout, int maxTimeout)
          Creates a new count
 
Method Summary
 int getCount()
          Returns a count
 int getMaxTimeout()
          Returns the maximum polling period in seconds.
 int getTimeout()
          Returns the minimum polling period in seconds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonCount

public JsonCount(int count,
                 int timeout,
                 int maxTimeout)
Creates a new count

Parameters:
count - the number of unseen notifications
timeout - minimum polling period in seconds
Method Detail

getCount

public int getCount()
Returns a count

Returns:
a count

getTimeout

public int getTimeout()
Returns the minimum polling period in seconds. Clients should not request the number of unseen notifications more often than this period.

Returns:
the minimum polling period in seconds

getMaxTimeout

public int getMaxTimeout()
Returns the maximum polling period in seconds. Clients can use this as an indicator a 'safe' timeout for background fetching.

Returns:
the maximum polling period in seconds


Copyright © 2013 Atlassian. All Rights Reserved.