aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/http/HttpConnectionManager.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-06-30 20:19:38 +0200
committerDaniel Gultsch <daniel@gultsch.de>2015-06-30 20:19:38 +0200
commited88b634fc8354d45df95745836dc5db0d58176b (patch)
treecdaae0ae0a1ac7842db872522717fcb5699e1a60 /src/main/java/eu/siacs/conversations/http/HttpConnectionManager.java
parenta2a1f1e0847952c1b6f08f003cd78ad5520a3db6 (diff)
parentc36238141de719442e3f542019e68e268f2f2265 (diff)
Merge branch 'feature/http_upload' into development
Diffstat (limited to 'src/main/java/eu/siacs/conversations/http/HttpConnectionManager.java')
-rw-r--r--src/main/java/eu/siacs/conversations/http/HttpConnectionManager.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/http/HttpConnectionManager.java b/src/main/java/eu/siacs/conversations/http/HttpConnectionManager.java
index 9a2a2405..fc266e7b 100644
--- a/src/main/java/eu/siacs/conversations/http/HttpConnectionManager.java
+++ b/src/main/java/eu/siacs/conversations/http/HttpConnectionManager.java
@@ -13,7 +13,8 @@ public class HttpConnectionManager extends AbstractConnectionManager {
super(service);
}
- private List<HttpConnection> connections = new CopyOnWriteArrayList<HttpConnection>();
+ private List<HttpConnection> connections = new CopyOnWriteArrayList<>();
+ private List<HttpUploadConnection> uploadConnections = new CopyOnWriteArrayList<>();
public HttpConnection createNewConnection(Message message) {
HttpConnection connection = new HttpConnection(this);
@@ -22,7 +23,18 @@ public class HttpConnectionManager extends AbstractConnectionManager {
return connection;
}
+ public HttpUploadConnection createNewUploadConnection(Message message) {
+ HttpUploadConnection connection = new HttpUploadConnection(this);
+ connection.init(message);
+ this.uploadConnections.add(connection);
+ return connection;
+ }
+
public void finishConnection(HttpConnection connection) {
this.connections.remove(connection);
}
+
+ public void finishUploadConnection(HttpUploadConnection httpUploadConnection) {
+ this.uploadConnections.remove(httpUploadConnection);
+ }
}