|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jivesoftware.smackx.filetransfer.FileTransferManager
public class FileTransferManager
The file transfer manager class handles the sending and recieving of files.
To send a file invoke the 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 Summary | |
---|---|
FileTransferManager(XMPPConnection connection)
Creates a file transfer manager to initiate and receive file transfers. |
Method Summary | |
---|---|
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(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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileTransferManager(XMPPConnection connection)
connection
- The XMPPConnection that the file transfers will use.Method Detail |
---|
public void addFileTransferListener(FileTransferListener li)
li
- The listenerremoveFileTransferListener(FileTransferListener)
,
FileTransferListener
protected void fireNewRequest(StreamInitiation initiation)
public void removeFileTransferListener(FileTransferListener li)
li
- The file transfer listener to be removedFileTransferListener
public OutgoingFileTransfer createOutgoingFileTransfer(String userID)
userID
- The fully qualified jabber ID with resource of the user to
send the file to.
protected IncomingFileTransfer createIncomingFileTransfer(FileTransferRequest request)
request
- The remote request that is being accepted.
protected void rejectIncomingFileTransfer(FileTransferRequest request)
|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |