|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.util.BasicSyncListener
public class BasicSyncListener
This class provides a basic implementation for a SyncListener. All methods are empty and users can easily extend this class to provide their own callbacks.
Field Summary |
---|
Constructor Summary | |
---|---|
BasicSyncListener()
|
Method Summary | |
---|---|
void |
dataReceived(java.lang.String date,
int size)
Invoked each time data is received from the server, with the timestamp and the size in bytes of the receive data. |
void |
endConnecting(int action)
Invoked at the end of the login phase. |
void |
endMapping()
Invoked at the end of the mapping phase. |
void |
endReceiving()
Invoked at the end of the receiving phase |
void |
endSending()
Invoked when the mail protocol subsystem has finished to send message. |
void |
endSession(int status)
Invoked at the end of a session, before closing the connection with the remote server. |
void |
endSyncing()
Invoked at the end of the syncing phase |
void |
itemAddSent(java.lang.Object item)
Invoked each time an item added is sent to the server. |
void |
itemDeleted(java.lang.Object item)
Invoked each time a message is deleted |
void |
itemDeleteSent(java.lang.Object item)
Invoked each time an item deleted is sent to the server. |
void |
itemReceived(java.lang.Object item)
Invoked each time a message is received and stored successfully in the client. |
void |
itemReplaceSent(java.lang.Object item)
Invoked each time an item replaced is sent to the server. |
void |
itemUpdated(java.lang.Object item)
Invoked when an item changes on the other side. |
void |
itemUpdated(java.lang.Object item,
java.lang.Object update)
Invoked when an item changes on the other side. |
void |
startConnecting()
Invoked at the beginning of the login phase. |
void |
startMapping()
Invoked at the beginning of the mapping phase. |
void |
startReceiving(int number)
Invoked when items are ready to be received from the server. |
void |
startSending(int numNewItems,
int numUpdItems,
int numDelItems)
Invoked before beginning to send items to the server. |
void |
startSession()
Invoked at the beginning of the session, before opening the connection with the server |
boolean |
startSyncing(int alertCode)
Invoked at the beginning of the syncing phase |
void |
syncStarted(int alertCode)
Invoked at the beginning of the syncing phase |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BasicSyncListener()
Method Detail |
---|
public void startSession()
startSession
in interface SyncListener
public void endSession(int status)
endSession
in interface SyncListener
status
- gives an indication if the session was error free or if
one or more errors were encountered. The value is encoded as a
bit mask according to the value of the STATUS_* constants (see
above). If no error was encountered then status has the value
STATUS_SUCCESS.public void startConnecting()
startConnecting
in interface SyncListener
public void endConnecting(int action)
endConnecting
in interface SyncListener
action
- describes the action the server requires (this value is
repository dependent)public void syncStarted(int alertCode)
syncStarted
in interface SyncListener
alertCode
- is the code returned by the server at the end of the
connection phasepublic void endSyncing()
endSyncing
in interface SyncListener
public void startReceiving(int number)
startReceiving
in interface SyncListener
number
- number of items that will be sent during the
session, if known, or ITEMS_NUMBER_UNKNOWN otherwise.public void endReceiving()
endReceiving
in interface SyncListener
public void itemReceived(java.lang.Object item)
itemReceived
in interface SyncListener
item
- is the new value receivedpublic void itemDeleted(java.lang.Object item)
itemDeleted
in interface SyncListener
itemId
- is the id of the value being removedpublic void itemUpdated(java.lang.Object item, java.lang.Object update)
itemUpdated
in interface SyncListener
item
- is the item that has changedupdate
- is a description of the update (the semantics of this
paramenter is completely SyncSource dependent)public void itemUpdated(java.lang.Object item)
itemUpdated
in interface SyncListener
item
- is the item that changedpublic void dataReceived(java.lang.String date, int size)
dataReceived
in interface SyncListener
date
- is the timestampsize
- is the number of bytes receivedpublic void startSending(int numNewItems, int numUpdItems, int numDelItems)
startSending
in interface SyncListener
numNewItems
- number of new items to be sentnumUpdItems
- number of updated items to be sentnumDelItems
- number of deleted items to be sentpublic void itemAddSent(java.lang.Object item)
itemAddSent
in interface SyncListener
public void itemReplaceSent(java.lang.Object item)
itemReplaceSent
in interface SyncListener
public void itemDeleteSent(java.lang.Object item)
itemDeleteSent
in interface SyncListener
public void endSending()
endSending
in interface SyncListener
public void startMapping()
startMapping
in interface SyncListener
public void endMapping()
endMapping
in interface SyncListener
public boolean startSyncing(int alertCode)
startSyncing
in interface SyncListener
alertCode
- is the code returned by the server at the end of the
connection phase
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |