|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mobileservices.isync.event.ISyncEvent
ISyncEvent is used to pass information from the synchronization engine to the implementor of ISyncListener via its eventIssued() method, and also from the client application to the synchronization engine.
The ISyncEvent object is valid only in the scope of the eventIssued method. After eventIssued returns, the ISyncEvent object will be invalidated.
A list of event types and its associated event code that the listener
is being notified of are listed below:
Please see the ISyncDriver specific implementation documentation for details as to what EVT_ codes and EVTTYPE_s are supported.
ISyncListener
Constructor Summary | |
ISyncEvent(com.ibm.mobileservices.isync.ISyncDriver source,
int eventType,
int eventCode,
java.lang.String subssetName,
java.lang.String subsName,
int subsType,
int retries,
int progress,
java.lang.Object eventInfo)
Class constructor. |
Method Summary | |
int |
getEventCode()
Returns the event code(EVT_*) for this event. |
java.lang.Object |
getEventInfo()
Gets specific information based on the event code. |
int |
getEventType()
Gets the event type(EVTTYPE_*) for this event. |
int |
getNumberOfRetries()
Gets the number of retries performed so far by the ISyncDriver. |
com.ibm.mobileservices.isync.ISyncDriver |
getSource()
Gets the event source. |
java.lang.String |
getSubscriptionName()
Gets the name of the subscription that is currently being synchronized. |
java.lang.String |
getSubscriptionSetName()
Gets the name of the subscription set that is currently being synchronized. |
int |
getSubscriptionType()
Gets the subscription type(SUBSTYPE_*); see ISync.java for valid ranges. |
int |
getSyncProgress()
Gets current sync progress; -1 indicates progress has not been set. |
void |
setEventValues(com.ibm.mobileservices.isync.ISyncDriver source,
int eventType,
int eventCode,
java.lang.String subssetName,
java.lang.String subsName,
int subsType,
int retries,
int progress,
java.lang.Object eventInfo)
Sets the state of the event. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ISyncEvent(com.ibm.mobileservices.isync.ISyncDriver source, int eventType, int eventCode, java.lang.String subssetName, java.lang.String subsName, int subsType, int retries, int progress, java.lang.Object eventInfo)
source
- an ISyncDriver objecteventType
- an int specifying event typeeventCode
- an int specifying event codesubssetName
- a String specifying subscription set namesubsName
- a String specifying subscription namesubsType
- an int specifying subscription typeretries
- an int specifying the number of retriesprogress
- an int specifying the synchronization progresseventInfo
- an Object supplying other information about the eventMethod Detail |
public void setEventValues(com.ibm.mobileservices.isync.ISyncDriver source, int eventType, int eventCode, java.lang.String subssetName, java.lang.String subsName, int subsType, int retries, int progress, java.lang.Object eventInfo)
source
- an ISyncDriver objecteventType
- an int specifying event typeeventCode
- an int specifying event codesubssetName
- a String specifying subscription set namesubsName
- a String specifying subscription namesubsType
- an int specifying subscription typeretries
- an int specifying the number of retriesprogress
- an int specifying the synchronization progresseventInfo
- an Object supplying other information about the eventpublic com.ibm.mobileservices.isync.ISyncDriver getSource()
public int getEventCode()
public int getEventType()
public java.lang.String getSubscriptionSetName()
public java.lang.String getSubscriptionName()
public int getSubscriptionType()
public int getNumberOfRetries()
public int getSyncProgress()
public java.lang.Object getEventInfo()
EVENT CODE | EVENT INFO OBJECT | DESCRIPTION |
ISync.EVT_CFT_REJECT | ISync Provider implementation dependent | Data conflicts in synchronization EventInfo object; keeps the actual conflicting data |
ISync.EVT_QUE_LOGIN | Java array of String objects:
User creates String objects below and sets the String references to the array in the following order: [out] arr[0]: Target name of data source [in] arr[1]: User name [in] arr[2]: Password |
Login information requested by an adapter. The listener should provide the requested info in the EventInfo and return ISync.RTNCB_DONE |
ISync.EVT_ERR_NOT_FOUND | Java array of String objects:
[out] arr[0]: Target name of data source [out] arr[1]: Data name |
Requested data not found |
ISync.EVT_ERR_READ_ONLY | Java array of String objects:
[out] arr[0]: Target name of data source [out] arr[1]: Data name |
Attempt to update read-only data |
ISync.EVT_ERR_NOT_AVAIL | Java array of String objects:
[out] arr[0]: Target name of data source [out] arr[1]: Data name |
Requested data not available |
ISync. EVT_ERR_DATA_TOO_LONG | Java array of String objects:
[out] arr[0]: Target name of data source [out] arr[1]: Data name [out] arr[2]: Data element name (if not empty) |
Data too long and truncated |
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |