|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
S - the source of data, where data is coming fromT - the target of data, where data is being transferred into.public interface DataTransfer<S,T>
A callback interface used to receive notifications of data transfers from a source to a target. Information about sizes transferred are implementation dependent and can signify bytes transferred, number of records, etc.
| Method Summary | |
|---|---|
void |
aborted(S source,
T target,
Exception error)
Notifies that the data transfer has been aborted. |
void |
completed(S source,
T target)
Notifies that a data transfer has been finalized. |
boolean |
isAborted()
Returns a flag indicating whether the data transfer was aborted. |
boolean |
isRunning()
Returns a flag indicating whether the data transfer is running. |
boolean |
isStarted()
Returns a flag indicating whether the data transfer has been started. |
void |
started(S source,
long totalSize,
T target)
Notifies a data transfer has been started. |
void |
transferred(S source,
long transferred,
T target)
Notifies how much data has been transferred from source to target. |
| Method Detail |
|---|
void started(S source,
long totalSize,
T target)
source - the source of datatotalSize - the total size of the data. The meaning of the
amount provided depends on the underlying implementation: this can be bytes, number of
records, etc. If -1, the total size is unknown ahead of time.target - the data target
void transferred(S source,
long transferred,
T target)
source - the source of datatransferred - the amount of data transferred since the last time this method was called. The meaning of the
amount provided depends on the underlying implementation: this can be bytes, number of
records, etc.target - the data target
void completed(S source,
T target)
source - the source of datatarget - the data target
void aborted(S source,
T target,
Exception error)
source - the source of datatarget - the data targeterror - exception that caused the process abortion.boolean isStarted()
boolean isRunning()
boolean isAborted()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||