diff options
Diffstat (limited to 'src/eu/siacs/conversations/http/HttpConnectionManager.java')
-rw-r--r-- | src/eu/siacs/conversations/http/HttpConnectionManager.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/eu/siacs/conversations/http/HttpConnectionManager.java b/src/eu/siacs/conversations/http/HttpConnectionManager.java index 4d6dce12..7393cf36 100644 --- a/src/eu/siacs/conversations/http/HttpConnectionManager.java +++ b/src/eu/siacs/conversations/http/HttpConnectionManager.java @@ -1,5 +1,6 @@ package eu.siacs.conversations.http; +import java.net.URL; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; @@ -12,8 +13,6 @@ public class HttpConnectionManager extends AbstractConnectionManager { public HttpConnectionManager(XmppConnectionService service) { super(service); } - - private XmppConnectionService mXmppConnectionService; private List<HttpConnection> connections = new CopyOnWriteArrayList<HttpConnection>(); @@ -24,4 +23,15 @@ public class HttpConnectionManager extends AbstractConnectionManager { this.connections.add(connection); return connection; } + + public HttpConnection createNewConnection(Message message, URL url) { + HttpConnection connection = new HttpConnection(this); + connection.init(message,url); + this.connections.add(connection); + return connection; + } + + public void finishConnection(HttpConnection connection) { + this.connections.remove(connection); + } } |