arlut.csd.ganymede
Interface FileReceiver

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
FileReceiverBase, xmlclientPrintReceiver

public interface FileReceiver
extends java.rmi.Remote

Interface that can be used on the server or client to represent an end-point for transmitting a file across the RMI link..


Method Summary
 ReturnVal end(boolean completed)
          This method is called to notify the FileReceiver that no more of the file will be transmitted.
 ReturnVal sendBytes(byte[] bytes)
          This method is used to send chunks of a file, in order, to the FileReceiver.
 ReturnVal sendBytes(byte[] bytes, int offset, int len)
          This method is used to send chunks of a file, in order, to the FileReceiver.
 

Method Detail

sendBytes

public ReturnVal sendBytes(byte[] bytes)
                    throws java.rmi.RemoteException

This method is used to send chunks of a file, in order, to the FileReceiver. The FileReceiver can return a non-successful ReturnVal if it wants to stop receiving the file. A null return value indicates success, keep sending.


sendBytes

public ReturnVal sendBytes(byte[] bytes,
                           int offset,
                           int len)
                    throws java.rmi.RemoteException

This method is used to send chunks of a file, in order, to the FileReceiver. The FileReceiver can return a non-successful ReturnVal if it wants to stop receiving the file. A null return value indicates success, keep sending.


end

public ReturnVal end(boolean completed)
              throws java.rmi.RemoteException

This method is called to notify the FileReceiver that no more of the file will be transmitted. The boolean parameter will be true if the file was completely sent, or false if the transmission is being aborted by the sender for some reason.

Returns:
Returns true if the FileReceiver successfully received the file in its entirety.