|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface UIHookIF
UIHookIF is an interface that allows the apps to interact with a UI component that's displaying status information. Two kinds of interaction are possible:
| Method Summary | |
|---|---|
void |
cancel()
allows the UI to cancel IO operations. once called this bit is set, and all subsequent IO ops will be cancelled. |
void |
close()
this is called when the underlying IO stream is closed, a signal that the IO operation has ended |
java.lang.String |
getProgressMessage()
This method simply returns the message set by setProgressMessage(String). |
void |
interrupedIO()
this is called when cancel() is called, or the underlying SwingWorker is cancelled. it results in the
underlying IO operation to be interrupted, and an InterruptedIOException to be thrown |
boolean |
isCancelled()
if the user has called cancel() then this returns true |
void |
resetCancelFlag()
if cancel() has been called, then this method must be called to allow future IO ops to proceed. |
void |
setProgressMessage(java.lang.String msg)
When the status is reported (SEND or RECIEVE), this message is passed along with those method calls to the UI itself. |
void |
updateRecieveStatus(int progress,
int total)
The RECIEVE status lets the UI know how much of the "recieve from service" operation has been completed. |
void |
updateSendStatus(int progress,
int total)
The SEND status lets the UI know how much of the "send to service" operation has been completed. |
| Method Detail |
|---|
void setProgressMessage(java.lang.String msg)
msg - this message is passed to the UI along with status updates on SEND/RECIEVE
this may be null.java.lang.String getProgressMessage()
setProgressMessage(String).
When status updates are sent to the UI, it can choose to use this message to update
the UI with.
void updateSendStatus(int progress,
int total)
progress - current number of bytes readtotal - bytes to be read, can be 0
void updateRecieveStatus(int progress,
int total)
progress - current number of bytes readtotal - bytes to be read, can be 0void cancel()
resetCancelFlag().
boolean isCancelled()
cancel() then this returns true
void resetCancelFlag()
cancel() has been called, then this method must be called to allow future IO ops to proceed.
void close()
void interrupedIO()
cancel() is called, or the underlying SwingWorker is cancelled. it results in the
underlying IO operation to be interrupted, and an InterruptedIOException to be thrown
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||