Interface IFileTransferRequestEvent
- 
- All Superinterfaces:
- Event,- IFileTransferEvent
 
 public interface IFileTransferRequestEvent extends IFileTransferEvent Event to represent remote file transfer requests. Events implementing this interface are delivered toIIncomingFileTransferRequestListener
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description IIncomingFileTransferaccept(File localFileToSave)Accept the file transfer request.IIncomingFileTransferaccept(OutputStream outputStream, IFileTransferListener listener)Accept the file transfer request.IFileTransferInfogetFileTransferInfo()Get file transfer info associated with this file transfer request evenIDgetRequesterID()Get ID of remote requestervoidreject()Reject the file transfer request.booleanrequestAccepted()If request was accepted from remote target (via successful call toaccept(File)this method will return true, if rejected or failed returns false.
 
- 
- 
- 
Method Detail- 
getRequesterIDID getRequesterID() Get ID of remote requester- Returns:
- ID of remote requester. Will not be null.
 
 - 
getFileTransferInfoIFileTransferInfo getFileTransferInfo() Get file transfer info associated with this file transfer request even- Returns:
- IFileTransfer info. Will not be null.
 
 - 
acceptIIncomingFileTransfer accept(File localFileToSave) throws IncomingFileTransferException Accept the file transfer request. This method should be called if the receiver of the IFileTransferRequestEvent would like to accept the file transfer request. Will not returnnull. Once called successfully, thenrequestAccepted()will return true, and further calls toaccept(File)oraccept(OutputStream, IFileTransferListener)will throw IncomingFileTransferExceptions.- Parameters:
- localFileToSave- the file on the local file system to receive the remote file. Must not be- null.
- Returns:
- IIncomingFileTransfer to receive file. Will not be
         null.
- Throws:
- IncomingFileTransferException- if accept message cannot be delivered back to requester
 
 - 
acceptIIncomingFileTransfer accept(OutputStream outputStream, IFileTransferListener listener) throws IncomingFileTransferException Accept the file transfer request. This method should be called if the receiver of the IFileTransferRequestEvent would like to accept the file transfer request. Will not returnnull. Once called successfully, thenrequestAccepted()will return true, and further calls toaccept(File)oraccept(OutputStream, IFileTransferListener)will throw IncomingFileTransferExceptions.- Parameters:
- outputStream- the output stream to receive the accepted file contents. Must not be- null.
- listener- for file transfer events during file reception. May be- null.
- Returns:
- IIncomingFileTransfer to receive file. Will not be
         null.
- Throws:
- IncomingFileTransferException- if accept message cannot be delivered back to requester
 
 - 
rejectvoid reject() Reject the file transfer request. This method should be called if the receiver of the IFileTransferRequestEvent would like to reject the file transfer request
 - 
requestAcceptedboolean requestAccepted() If request was accepted from remote target (via successful call toaccept(File)this method will return true, if rejected or failed returns false.- Returns:
- true if request was accepted, false if rejected or failed
 
 
- 
 
-