uk.ac.rdg.resc.jstyx.client.callbacks
Class UploadCallback
java.lang.Object
uk.ac.rdg.resc.jstyx.client.MessageCallback
uk.ac.rdg.resc.jstyx.client.callbacks.UploadCallback
public class UploadCallback
- extends MessageCallback
Callback that is used when uploading a file to the server. Contains
state that needs to persist between message exchanges with the server. See
CStyxFile.uploadAsync()
- Author:
- jdb
$Revision: 475 $
$Date: 2005-11-09 17:39:55 +0000 (Wed, 09 Nov 2005) $
$Log$
Revision 1.5 2005/11/09 17:39:55 jonblower
Fixed bug with omission of response to Ropen/Rcreate message
Revision 1.4 2005/11/07 22:01:35 jonblower
Added code to close stream when UploadCallback has been created from a File object
Revision 1.3 2005/11/04 19:25:14 jonblower
Added code to write a zero-byte message to represent EOF
Revision 1.1 2005/08/05 13:46:40 jonblower
Factored out all callback objects from CStyxFile into separate classes
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UploadCallback
public UploadCallback(CStyxFile file,
java.io.File localFile,
MessageCallback callback)
UploadCallback
public UploadCallback(CStyxFile file,
java.io.InputStream in,
MessageCallback callback)
nextStage
public void nextStage(StyxMessage rMessage,
StyxMessage tMessage)
replyArrived
public void replyArrived(StyxMessage rMessage,
StyxMessage tMessage)
- Description copied from class:
MessageCallback
- Called when the reply arrives. If the reply is an RreadMessage, the
message's buffer should be released when it is no longer needed,
using
rMessage.getData().release().
- Specified by:
replyArrived in class MessageCallback
- Parameters:
rMessage - the replytMessage - the original T-message
error
public void error(java.lang.String message,
StyxMessage tMessage)
- Description copied from class:
MessageCallback
- Called when an error occurs (this may occur if the server returned an
Rerror message, or if the reply was not of the expected type, or for
other reasons).
- Specified by:
error in class MessageCallback
- Parameters:
message - The error stringtMessage - The T-message that caused this error to happen
Copyright © 2004-2006 Reading e-Science Centre. All Rights Reserved.