Class FileTransferManager
java.lang.Object
org.jivesoftware.smack.Manager
org.jivesoftware.smackx.filetransfer.FileTransferManager
The file transfer manager class handles the sending and receiving of files.
To send a file invoke the
createOutgoingFileTransfer(EntityFullJid)
method.
And to receive a file add a file transfer listener to the manager. The
listener will notify you when there is a new file transfer request. To create
the IncomingFileTransfer
object accept the transfer, or, if the
transfer is not desirable reject it.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a file transfer listener to listen to incoming file transfer requests.Creates an OutgoingFileTransfer to send a file to another user.static FileTransferManager
getInstanceFor
(XMPPConnection connection) void
Removes a file transfer listener.Methods inherited from class org.jivesoftware.smack.Manager
connection, getAuthenticatedConnectionOrThrow, schedule, schedule, scheduleBlocking
-
Method Details
-
getInstanceFor
-
addFileTransferListener
Add a file transfer listener to listen to incoming file transfer requests.- Parameters:
li
- TODO javadoc me please The listener- See Also:
-
removeFileTransferListener
Removes a file transfer listener.- Parameters:
li
- TODO javadoc me please The file transfer listener to be removed- See Also:
-
createOutgoingFileTransfer
Creates an OutgoingFileTransfer to send a file to another user.- Parameters:
userID
- TODO javadoc me please The fully qualified jabber ID (i.e. full JID) with resource of the user to send the file to.- Returns:
- The send file object on which the negotiated transfer can be run.
- Throws:
IllegalArgumentException
- if userID is null or not a full JID
-