|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mobileservices.isync.ISyncManager
Manages different client implementations of ISyncProvider and ISyncService, allowing applications to not compile in a specific client and allow access to all clients. Implementation similar to JDBC's DriverManager.
import com.ibm.mobileservices.isync.ISyncManager;
Class.forName("com.ibm.mobileservices.isync.db2j.DB2jISyncProvider");
provider = ISyncManager.getISyncProvider("isync:db2j:");
ISyncService service = provider.createSyncService("http://localhost:80", userProps);
ISyncConfig config = service.getConfigStore("");
ISyncDriver syncer = config.getSyncDriver();
syncer.sync();
syncer.close();
config.close();
service.close();
Field Summary | |
static java.lang.String |
ISYNC_DB2E_PROTOCOL
Protocol for DB2e provider. |
static java.lang.String |
ISYNC_DB2J_PROTOCOL
Protocol for DB2j provider. |
static java.lang.String |
ISYNC_DB2PE_PROTOCOL
Protocol for DB2 PE provider. |
Method Summary | |
static void |
deregisterProvider(ISyncProvider isyncP)
Internal un-register provider with the manager. |
static ISyncProvider |
getISyncProvider(java.lang.String uri)
Returns an instance of ISyncProvider. |
static java.util.Enumeration |
getISyncProviders()
Gets a list of registered providers. |
static ISyncService |
getISyncService(java.lang.String uri,
java.lang.Object prop)
Gets a synchronization service instance. |
static void |
registerProvider(ISyncProvider isyncP)
Internal register provider with the manager. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String ISYNC_DB2E_PROTOCOL
public static final java.lang.String ISYNC_DB2J_PROTOCOL
public static final java.lang.String ISYNC_DB2PE_PROTOCOL
Method Detail |
public static void registerProvider(ISyncProvider isyncP)
isyncP
- an instance of ISyncProvider.public static void deregisterProvider(ISyncProvider isyncP)
isyncP
- an instance of ISyncProvider.public static java.util.Enumeration getISyncProviders()
public static ISyncProvider getISyncProvider(java.lang.String uri) throws ISyncException
uri
- a String uri
ISyncException
- with code:
public static ISyncService getISyncService(java.lang.String uri, java.lang.Object prop) throws ISyncException
DB2e encodings:
Win32 and Palm have default encodings of Cp1252. Win32 unicode, WinCE, and Symbian should only use "UnicodeLittle" (default). Linux and QNX Neutrino should use "UTF-8" (default).
uri
- [protocol]+[url]prop
- Object which is an instance of Properties, user and
password are used for the DB2 Everyplace Sync Server
authentication.
See specific implementations for what properties may be set.
MIDP accepts a Hashtable since there are no Properties.
ISyncException
- with code:
An example of how to use the propObj parameter:
Properties prop = new Properties():
prop.put("isync.user", "nurse1");
prop.put("isync.password", "nurse1");
prop.put("isync.encoding", "Cp1252");
prop.put("isync.trace", "detailed");
prop.put("isync.messagesize", "64000");
ISyncManager.getISyncService("jdbc:db2e:http://localhost:80", prop);
ISyncConfigStore
,
ISync
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |