aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/http/ProgressListener.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/http/ProgressListener.java')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/http/ProgressListener.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/http/ProgressListener.java b/src/main/java/de/thedevstack/conversationsplus/http/ProgressListener.java
new file mode 100644
index 00000000..b834eae1
--- /dev/null
+++ b/src/main/java/de/thedevstack/conversationsplus/http/ProgressListener.java
@@ -0,0 +1,14 @@
+package de.thedevstack.conversationsplus.http;
+
+/**
+ *
+ */
+public interface ProgressListener {
+ /**
+ * React on transferred bytes.
+ * @param bytesRead the number of bytes transferred in the current chunk
+ * @param contentLength the total number of bytes to be transferred
+ * @param done whether there are bytes left or not
+ */
+ void update(long bytesRead, long contentLength, boolean done);
+}