Interface IFileTransferRequestEvent
- All Superinterfaces:
Event
,IFileTransferEvent
Event to represent remote file transfer requests. Events implementing this
interface are delivered to
IIncomingFileTransferRequestListener
-
Method Summary
Modifier and TypeMethodDescriptionAccept the file transfer request.accept
(OutputStream outputStream, IFileTransferListener listener) Accept the file transfer request.Get file transfer info associated with this file transfer request evenGet ID of remote requestervoid
reject()
Reject the file transfer request.boolean
If request was accepted from remote target (via successful call toaccept(File)
this method will return true, if rejected or failed returns false.
-
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 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 benull
.- Returns:
- IIncomingFileTransfer to receive file. Will not be
null
. - Throws:
IncomingFileTransferException
- if accept message cannot be delivered back to requester
-
accept
IIncomingFileTransfer 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 benull
.listener
- for file transfer events during file reception. May benull
.- 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 toaccept(File)
this method will return true, if rejected or failed returns false.- Returns:
- true if request was accepted, false if rejected or failed
-