public class FileTransferManager
extends java.lang.Object
createOutgoingFileTransfer(String) method.
And to recieve 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.
| Constructor and Description |
|---|
FileTransferManager(XMPPConnection connection)
Creates a file transfer manager to initiate and receive file transfers.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFileTransferListener(FileTransferListener li)
Add a file transfer listener to listen to incoming file transfer
requests.
|
protected IncomingFileTransfer |
createIncomingFileTransfer(FileTransferRequest request)
When the file transfer request is acceptable, this method should be
invoked.
|
OutgoingFileTransfer |
createOutgoingFileTransfer(java.lang.String userID)
Creates an OutgoingFileTransfer to send a file to another user.
|
protected void |
fireNewRequest(StreamInitiation initiation) |
protected void |
rejectIncomingFileTransfer(FileTransferRequest request) |
void |
removeFileTransferListener(FileTransferListener li)
Removes a file transfer listener.
|
public FileTransferManager(XMPPConnection connection)
connection - The XMPPConnection that the file transfers will use.public void addFileTransferListener(FileTransferListener li)
li - The listenerremoveFileTransferListener(FileTransferListener),
FileTransferListenerprotected void fireNewRequest(StreamInitiation initiation)
public void removeFileTransferListener(FileTransferListener li)
li - The file transfer listener to be removedFileTransferListenerpublic OutgoingFileTransfer createOutgoingFileTransfer(java.lang.String userID)
userID - The fully qualified jabber ID (i.e. full JID) with resource of the user to
send the file to.java.lang.IllegalArgumentException - if userID is null or not a full JIDprotected IncomingFileTransfer createIncomingFileTransfer(FileTransferRequest request)
request - The remote request that is being accepted.protected void rejectIncomingFileTransfer(FileTransferRequest request) throws SmackException.NotConnectedException