com.funambol.util
Class ConnectionManager

java.lang.Object
  extended by com.funambol.util.ConnectionManager

public class ConnectionManager
extends java.lang.Object

Controls HTTP and HTTPS connections requested by the API implementations.


Constructor Summary
protected ConnectionManager()
          Private constructor - Use getInstance() method
 
Method Summary
 ConnectionListener getConnectionListener()
           
static ConnectionManager getInstance()
          Singleton implementation:
 HttpConnectionAdapter openHttpConnection(java.lang.String url, java.lang.Object extra)
          Open an http connection to the given URL
 SocketAdapter openSocketConnection(java.lang.String addr, int port, int mode, boolean timeout)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionManager

protected ConnectionManager()
Private constructor - Use getInstance() method

Method Detail

getInstance

public static ConnectionManager getInstance()
Singleton implementation:

Returns:
the current instance of this class or a new instance if it the current instance is null

getConnectionListener

public ConnectionListener getConnectionListener()

openHttpConnection

public HttpConnectionAdapter openHttpConnection(java.lang.String url,
                                                java.lang.Object extra)
                                         throws java.io.IOException
Open an http connection to the given URL

Parameters:
url - is the url (in the form of "http://..." or "https://...")
extra - is some extra information that can be specified to specific implementations
Throws:
java.io.IOException - if the connection cannot be established

openSocketConnection

public SocketAdapter openSocketConnection(java.lang.String addr,
                                          int port,
                                          int mode,
                                          boolean timeout)
                                   throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2001-2009 Funambol.