summaryrefslogtreecommitdiff
path: root/src/io/RateLimitException.java
diff options
context:
space:
mode:
authorMaurice Laveaux <m.laveaux@student.tue.nl>2014-05-22 14:47:03 +0200
committerMaurice Laveaux <m.laveaux@student.tue.nl>2014-05-22 14:47:03 +0200
commit2b2a47a0086eab52b09e5425e75cafb488e51074 (patch)
tree5ea244f904d4a9ce9855133ec3df4f06f8b7c95a /src/io/RateLimitException.java
parentb318cc755befd04f711c03f927789fc8c1a72216 (diff)
downloadTwitterDataAnalytics-2b2a47a0086eab52b09e5425e75cafb488e51074.tar.gz
Updated the Requesters to throw RateLimitException.
* The exception contains the reset timestamp in unix time.
Diffstat (limited to 'src/io/RateLimitException.java')
-rw-r--r--src/io/RateLimitException.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/io/RateLimitException.java b/src/io/RateLimitException.java
new file mode 100644
index 0000000..2bb2624
--- /dev/null
+++ b/src/io/RateLimitException.java
@@ -0,0 +1,18 @@
+package io;
+
+/**
+ * The exception that will be thrown when a ratelimit has been hit.
+ *
+ * @author Maurice Laveaux
+ */
+public class RateLimitException extends Exception {
+ private final long rateLimitReset;
+
+ public RateLimitException(long resetTime) {
+ rateLimitReset = resetTime;
+ }
+
+ public long getResetTime() {
+ return rateLimitReset;
+ }
+}