|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CStyxFileChangeListener
Interface defining methods that will be fired when messages pertaining to a StyxFile arrive at the client (e.g. data has been read, permissions changed etc)
| Method Summary | |
|---|---|
void |
childrenFound(CStyxFile file,
CStyxFile[] children)
Called after a successful read on a directory. |
void |
dataArrived(CStyxFile file,
TreadMessage tReadMsg,
org.apache.mina.common.ByteBuffer data)
Called when new data have been read from the file (after the Rread message arrives). |
void |
dataWritten(CStyxFile file,
TwriteMessage tWriteMsg)
Called when data have been written to the file (after the Rwrite message arrives). |
void |
downloadComplete(CStyxFile sourceFile)
Called after a file has been successfully downloaded |
void |
error(CStyxFile file,
java.lang.String message)
Called when an Rerror message arrives |
void |
fileCreated(CStyxFile file,
int mode)
Called when the file has been created. |
void |
fileOpen(CStyxFile file,
int mode)
Called when the file has been opened. |
void |
statChanged(CStyxFile file,
DirEntry newDirEntry)
Called after the stat of a file (permissions etc) has been changed. |
void |
uploadComplete(CStyxFile targetFile)
Called after a file has been successfully uploaded |
| Method Detail |
|---|
void fileOpen(CStyxFile file,
int mode)
file - The file that has been openedmode - The mode with which the file was opened
void fileCreated(CStyxFile file,
int mode)
file - The file that has been createdmode - The mode with which the file was created
void dataArrived(CStyxFile file,
TreadMessage tReadMsg,
org.apache.mina.common.ByteBuffer data)
file.setOffset(offset + data.remaining())).
After this method is finished, the ByteBuffer will automatically be returned to the pool.
If you want to delay this happening, call data.acquire() within this
method. Then when you no longer need the data in the buffer, call
data.release().
file - The CStyxFile containing the datatReadMsg - The original TreadMessage that was sent (contains the offset,
tag etc of the message)data - The new data that have been read from the file
void dataWritten(CStyxFile file,
TwriteMessage tWriteMsg)
file.setOffset(offset + data.remaining())).
file - The CStyxFile containing the datatWriteMsg - The TwriteMessage that caused this event to be fired
void error(CStyxFile file,
java.lang.String message)
file - the CStyxFile from which the error originatedmessage - the error message
void statChanged(CStyxFile file,
DirEntry newDirEntry)
void childrenFound(CStyxFile file,
CStyxFile[] children)
void uploadComplete(CStyxFile targetFile)
targetFile - The file to which we have writtenvoid downloadComplete(CStyxFile sourceFile)
sourceFile - The file from which the data have been downloaded.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||