Interface FileTransferEventListener
-
public interface FileTransferEventListener
An event listener for File Transfer related events.- Author:
- Guus der Kinderen, guus.der.kinderen@gmail.com
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
fileTransferComplete(FileTransfer transfer, boolean wasSuccessful)
Invoked when a file transfer was completed.void
fileTransferStart(FileTransfer transfer, boolean isReady)
Invoked when a file transfer is about to start..
-
-
-
Method Detail
-
fileTransferStart
void fileTransferStart(FileTransfer transfer, boolean isReady) throws FileTransferRejectedException
Invoked when a file transfer is about to start.. The interceptor can either modify the file transfer or throw a FileTransferRejectedException. The file transfer went sent to the interceptor can be in two states, ready and not ready. The not ready state indicates that this event was fired when the file transfer request was sent by the initiator. The ready state indicates that the file transfer is ready to begin, and the channels can be manipulated by the interceptor.It is recommended for the the sake of user experience that when in the not ready state, any processing done on the file transfer should be quick.
- Parameters:
transfer
- the transfer being intercepted (never null).isReady
- true if the transfer is ready to commence or false if this is related to the initial file transfer request. An exception at this point will cause the transfer to not go through.- Throws:
FileTransferRejectedException
- if the request was rejected
-
fileTransferComplete
void fileTransferComplete(FileTransfer transfer, boolean wasSuccessful)
Invoked when a file transfer was completed. Events are generated for events that succeeded, but also for those that failed.- Parameters:
transfer
- the transfer being intercepted (never null).wasSuccessful
- false when an exception was thrown during file transfer, otherwise true.
-
-