|
SmartSync 1.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
The EventMonitor is the interface to a plugable mechanism to monitor all the events that occur
during the synchronization process. The methods get called in the following sequence:
onStart onTaskAnnounce ... onTaskAnnounce[n] onTaskStart onTaskCompletion ... onTaskStart[n] onTaskCompletion[n] onSuccessThe calls to
onProgress and onAbortCheck may occur several times between onStart and onSuccess.onIOException may occur once after onStart. After this call, the synchronization process is aborted and the sequence of calls
is terminated.
| Method Summary | |
void |
onAbortCheck()
Checks for abortion of the operation. |
void |
onIOException(java.io.IOException iox,
Task task)
This callback is used to inform the target about an input/output problem. |
void |
onProgress(TransferProgress progress)
This method gets called upon transfer progress. |
void |
onStart(java.net.URL remoteDirectory,
java.io.File localDirectory)
This method is called immediately after the start of the synchronization by SmartSyncClient.synchronize(...). |
void |
onSuccess(boolean updateDone)
This callback is used the after successful completion of the synchronization process. |
void |
onTaskAnnounce(Task task)
This method gets called when the header of the response has arrived from the server and when there are some tasks to do. |
void |
onTaskCompletion(Task task)
This method gets called immediately after a task has comleted. |
void |
onTaskStart(Task task)
This method gets called immediately before a task starts. |
| Method Detail |
public void onStart(java.net.URL remoteDirectory,
java.io.File localDirectory)
SmartSyncClient.synchronize(...).remoteDirectory - The URL pointing to the SmartSyncServer.localDirectory - The local directory that gets updated.public void onTaskAnnounce(Task task)
onSuccess(...)
method is called directly. onTaskStart(...), but it's not
guaranteed.task - The task that will be started later. This parameter is never null.public void onTaskStart(Task task)
task - The task that gets started. This parameter is never null.public void onTaskCompletion(Task task)
task - The task that has completed. This parameter is never null.public void onProgress(TransferProgress progress)
progress - A progress object containing the current progress values. This parameter is never null.
public void onAbortCheck()
throws UserAbortIOException
UserAbortIOException when to terminate the synchroniztaion process.public void onSuccess(boolean updateDone)
updateDone - true, if an update was available, false otherwise. In each case, the synchronization process is completed
and the directory structures are in sync.
public void onIOException(java.io.IOException iox,
Task task)
iox - The IOException that describes the problem in detail. This parameter is never null.
|
SmartSync 1.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||