Package jadex.commons
Class HttpConnectionManager
- java.lang.Object
- 
- jadex.commons.HttpConnectionManager
 
- 
 public class HttpConnectionManager extends java.lang.ObjectThe connection manager allows asynchronously terminating open connections to avoid hanging on e.g. platform shutdown.
- 
- 
Constructor SummaryConstructors Constructor Description HttpConnectionManager()Create a new connection manager.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidcloseConnection(java.net.HttpURLConnection con)Close a connectionvoiddispose()Dispose the connection manager and close all open connections.java.net.HttpURLConnectionopenConnection(java.lang.String address)Open a receiving connection.voidremove(java.net.HttpURLConnection con)Remove a connection.
 
- 
- 
- 
Method Detail- 
disposepublic void dispose() Dispose the connection manager and close all open connections.
 - 
openConnectionpublic java.net.HttpURLConnection openConnection(java.lang.String address) throws java.io.IOExceptionOpen a receiving connection. The connection should be removed when it is closed to avoid memory leaks.- Parameters:
- address- The address to connect to.
- Returns:
- The connection.
- Throws:
- java.io.IOException- on connection failures
 
 - 
removepublic void remove(java.net.HttpURLConnection con) Remove a connection.- Parameters:
- con- The previously opened connection.
 
 - 
closeConnectionpublic static void closeConnection(java.net.HttpURLConnection con) Close a connection
 
- 
 
-