Class ConnectionManager
- java.lang.Object
-
- com.zing.zalo.zbrowser.downloader.ConnectionManager
-
public class ConnectionManager extends Object
-
-
Constructor Summary
Constructors Constructor Description ConnectionManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ZConnectionborrowConnection(HttpUrl url)voidcleanOldConnection()voidcloseAllConnection()static voidcloseConnection(SocketChannel connection)static SocketChannelopenNewConnection(String domain, int port)voidreturnConnection(HttpUrl url, SocketChannel connection, ZSSLConnection sslConnection)
-
-
-
Method Detail
-
openNewConnection
public static SocketChannel openNewConnection(String domain, int port) throws IOException
- Throws:
IOException
-
closeConnection
public static void closeConnection(SocketChannel connection)
-
borrowConnection
public ZConnection borrowConnection(HttpUrl url) throws IOException
- Throws:
IOException
-
returnConnection
public void returnConnection(HttpUrl url, SocketChannel connection, ZSSLConnection sslConnection)
-
closeAllConnection
public void closeAllConnection()
-
cleanOldConnection
public void cleanOldConnection()
-
-