Interface IFileTransferRequestEvent

All Superinterfaces:
Event, IFileTransferEvent

public interface IFileTransferRequestEvent extends IFileTransferEvent
Event to represent remote file transfer requests. Events implementing this interface are delivered to IIncomingFileTransferRequestListener
See Also:
  • Method Details

    • getRequesterID

      ID getRequesterID()
      Get ID of remote requester
      Returns:
      ID of remote requester. Will not be null.
    • getFileTransferInfo

      IFileTransferInfo getFileTransferInfo()
      Get file transfer info associated with this file transfer request even
      Returns:
      IFileTransfer info. Will not be null.
    • accept

      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 return null. Once called successfully, then requestAccepted() will return true, and further calls to accept(File) or accept(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
    • accept

      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 return null. Once called successfully, then requestAccepted() will return true, and further calls to accept(File) or accept(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
    • reject

      void 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
    • requestAccepted

      boolean requestAccepted()
      If request was accepted from remote target (via successful call to accept(File)this method will return true, if rejected or failed returns false.
      Returns:
      true if request was accepted, false if rejected or failed