|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.rdg.resc.jstyx.client.CStyxFileChangeAdapter
public class CStyxFileChangeAdapter
Convenience class that provides empty implementations for all the methods in CStyxFileChangeListener.
| Constructor Summary | |
|---|---|
CStyxFileChangeAdapter()
|
|
| 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CStyxFileChangeAdapter()
| Method Detail |
|---|
public void fileOpen(CStyxFile file,
int mode)
fileOpen in interface CStyxFileChangeListenerfile - The file that has been openedmode - The mode with which the file was opened
public void fileCreated(CStyxFile file,
int mode)
fileCreated in interface CStyxFileChangeListenerfile - The file that has been createdmode - The mode with which the file was created
public 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().
dataArrived in interface CStyxFileChangeListenerfile - 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
public void dataWritten(CStyxFile file,
TwriteMessage tWriteMsg)
file.setOffset(offset + data.remaining())).
dataWritten in interface CStyxFileChangeListenerfile - The CStyxFile containing the datatWriteMsg - The TwriteMessage that caused this event to be fired
public void error(CStyxFile file,
java.lang.String message)
error in interface CStyxFileChangeListenerfile - the CStyxFile from which the error originatedmessage - the error message
public void statChanged(CStyxFile file,
DirEntry newDirEntry)
statChanged in interface CStyxFileChangeListener
public void childrenFound(CStyxFile file,
CStyxFile[] children)
childrenFound in interface CStyxFileChangeListenerpublic void uploadComplete(CStyxFile targetFile)
uploadComplete in interface CStyxFileChangeListenertargetFile - The file to which we have writtenpublic void downloadComplete(CStyxFile sourceFile)
downloadComplete in interface CStyxFileChangeListenersourceFile - 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 | |||||||||