final class RateLimitStatusJSONImpl extends java.lang.Object implements RateLimitStatus, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
private int |
hourlyLimit |
private int |
remainingHits |
private java.util.Date |
resetTime |
private int |
resetTimeInSeconds |
private int |
secondsUntilReset |
private static long |
serialVersionUID |
| Modifier | Constructor and Description |
|---|---|
(package private) |
RateLimitStatusJSONImpl(twitter4j.internal.http.HttpResponse res) |
private |
RateLimitStatusJSONImpl(int hourlyLimit,
int remainingHits,
int resetTimeInSeconds,
java.util.Date resetTime) |
(package private) |
RateLimitStatusJSONImpl(twitter4j.internal.org.json.JSONObject json) |
| Modifier and Type | Method and Description |
|---|---|
(package private) static RateLimitStatus |
createFeatureSpecificRateLimitStatusFromResponseHeader(twitter4j.internal.http.HttpResponse res) |
(package private) static RateLimitStatus |
createFromResponseHeader(twitter4j.internal.http.HttpResponse res) |
boolean |
equals(java.lang.Object o) |
int |
getHourlyLimit()
Returns the current limit in effect
This value is identical to the "X-RateLimit-Limit" response header. |
int |
getRemainingHits()
Returns the remaining number of API requests available.
This value is identical to the "X-RateLimit-Remaining" response header. |
java.util.Date |
getResetTime()
Returns the time the current rate limiting period ends.
This value is a java.util.Date-typed variation of the "X-RateLimit-Reset" response header. |
int |
getResetTimeInSeconds()
Returns the seconds the current rate limiting period ends.
This should be a same as getResetTime().getTime()/1000. |
int |
getSecondsUntilReset()
Returns the amount of seconds until the current rate limiting period ends.
This is a value provided/calculated only by Twitter4J for handiness and not a part of the twitter API spec. |
int |
hashCode() |
(package private) void |
init(twitter4j.internal.org.json.JSONObject json) |
java.lang.String |
toString() |
private int remainingHits
private int hourlyLimit
private int resetTimeInSeconds
private int secondsUntilReset
private java.util.Date resetTime
private static final long serialVersionUID
private RateLimitStatusJSONImpl(int hourlyLimit,
int remainingHits,
int resetTimeInSeconds,
java.util.Date resetTime)
RateLimitStatusJSONImpl(twitter4j.internal.http.HttpResponse res)
throws TwitterException
TwitterExceptionRateLimitStatusJSONImpl(twitter4j.internal.org.json.JSONObject json)
throws TwitterException
TwitterExceptionvoid init(twitter4j.internal.org.json.JSONObject json)
throws TwitterException
TwitterExceptionstatic RateLimitStatus createFromResponseHeader(twitter4j.internal.http.HttpResponse res)
static RateLimitStatus createFeatureSpecificRateLimitStatusFromResponseHeader(twitter4j.internal.http.HttpResponse res)
public int getRemainingHits()
getRemainingHits in interface RateLimitStatuspublic int getHourlyLimit()
getHourlyLimit in interface RateLimitStatuspublic int getResetTimeInSeconds()
getResetTimeInSeconds in interface RateLimitStatuspublic int getSecondsUntilReset()
getSecondsUntilReset in interface RateLimitStatuspublic java.util.Date getResetTime()
getResetTime in interface RateLimitStatuspublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object