|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.util.ConnectionManager
public class ConnectionManager
Controls all of the connections requested by the API implementations. It is strongly recommended to use this class instead of the direct call to the Connector.open(String url) method. This class is based on the singleton pattern: it has private constructor and just one instance to be referenced calling the method ConnectionManager.getInstance() by other classes.
Method Summary | |
---|---|
ConnectionListener |
getConnectionListener()
Accessor method to get the current connection listener |
static ConnectionManager |
getInstance()
Singleton implementation: |
Connection |
open(java.lang.String url)
Open up a connection to the give url |
Connection |
open(java.lang.String url,
int mode,
boolean b)
Open up a connection to the given url with the given access mode and |
void |
setConnectionListener(ConnectionListener cl)
Accessor method to set the connection listener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ConnectionManager getInstance()
public Connection open(java.lang.String url) throws java.io.IOException
url
- The URL for the connection
java.io.IOException
public Connection open(java.lang.String url, int mode, boolean b) throws java.io.IOException
url
- The URL for the connectionmode
- the access mode that can be READ, WRITE, READ_WRITEb
- A flag to indicate that the called wants timeout exceptions
java.io.IOException
public void setConnectionListener(ConnectionListener cl)
cl
- the connection listener to be setpublic ConnectionListener getConnectionListener()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |