|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.syncml.spds.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(SyncReport report)
Invoked at the end of a session after the last message was exchanged (or an error occurred). |
void |
endSyncing()
Invoked at the end of the syncing phase |
void |
itemAddChunkSent(java.lang.String key,
java.lang.String parent,
int size)
Invoked when a chunk of a new item was sent |
void |
itemAddSendingEnded(java.lang.String key,
java.lang.String parent,
int size)
Invoked when the sending of a new item has terminated |
void |
itemAddSendingStarted(java.lang.String key,
java.lang.String parent,
int size)
Invoked when the sending of a new item has started |
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 |
itemReplaceChunkSent(java.lang.String key,
java.lang.String parent,
int size)
Invoked when a chunk of a replaced item was sent |
void |
itemReplaceSendingEnded(java.lang.String key,
java.lang.String parent,
int size)
Invoked when the sending of a replaced item has terminated |
void |
itemReplaceSendingStarted(java.lang.String key,
java.lang.String parent,
int size)
Invoked when the sending of a replaced item has started |
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,
DevInf devInf)
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(SyncReport report)
endSession
in interface SyncListener
report
- this is a summary of what happened during the sync,
including the overall status.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 itemAddSendingStarted(java.lang.String key, java.lang.String parent, int size)
SyncListener
itemAddSendingStarted
in interface SyncListener
key
- is the item keyparent
- is the item parentsize
- is the item size (total size, regardless of chunking)public void itemAddSendingEnded(java.lang.String key, java.lang.String parent, int size)
SyncListener
itemAddSendingEnded
in interface SyncListener
key
- is the item keyparent
- is the item parentsize
- is the item size (total size, regardless of chunking)public void itemAddChunkSent(java.lang.String key, java.lang.String parent, int size)
SyncListener
itemAddChunkSent
in interface SyncListener
key
- is the item keyparent
- is the item parentsize
- is the item size (chunk size)public void itemReplaceSendingStarted(java.lang.String key, java.lang.String parent, int size)
SyncListener
itemReplaceSendingStarted
in interface SyncListener
key
- is the item keyparent
- is the item parentsize
- is the item size (total size, regardless of chunking)public void itemReplaceSendingEnded(java.lang.String key, java.lang.String parent, int size)
SyncListener
itemReplaceSendingEnded
in interface SyncListener
key
- is the item keyparent
- is the item parentsize
- is the item size (total size, regardless of chunking)public void itemReplaceChunkSent(java.lang.String key, java.lang.String parent, int size)
SyncListener
itemReplaceChunkSent
in interface SyncListener
key
- is the item keyparent
- is the item parentsize
- is the item size (chunk size)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, DevInf devInf)
startSyncing
in interface SyncListener
alertCode
- is the code returned by the server at the end of the
connection phaseserverDevInf
- is the server device info if they are provided by the
server. The server can send its dev inf if they changed or if the client
requested them (@see SyncManager.sync). This value may be null if the
server did not provide its device information.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |