Class FileTransferRequest
- java.lang.Object
-
- org.jivesoftware.smackx.filetransfer.FileTransferRequest
-
public class FileTransferRequest extends java.lang.Object
A request to send a file received from another user.
-
-
Constructor Summary
Constructors Constructor Description FileTransferRequest(FileTransferManager manager, StreamInitiation si)
A receive request is constructed from the Stream Initiation request received from the initiator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IncomingFileTransfer
accept()
Accepts this file transfer and creates the incoming file transfer.java.lang.String
getDescription()
Returns the description of the file provided by the requester.java.lang.String
getFileName()
Returns the name of the file.long
getFileSize()
Returns the size in bytes of the file.java.lang.String
getMimeType()
Returns the mime-type of the file.Jid
getRequestor()
Returns the fully-qualified jabber ID of the user that requested this file transfer.java.lang.String
getStreamID()
Returns the stream ID that uniquely identifies this file transfer.protected StreamInitiation
getStreamInitiation()
Returns the stream initiation stanza that was sent by the requester which contains the parameters of the file transfer being transfer and also the methods available to transfer the file.void
reject()
Rejects the file transfer request.
-
-
-
Constructor Detail
-
FileTransferRequest
public FileTransferRequest(FileTransferManager manager, StreamInitiation si)
A receive request is constructed from the Stream Initiation request received from the initiator.- Parameters:
manager
- TODO javadoc me please The manager handling this file transfersi
- TODO javadoc me please The Stream initiation received from the initiator.
-
-
Method Detail
-
getFileName
public java.lang.String getFileName()
Returns the name of the file.- Returns:
- Returns the name of the file.
-
getFileSize
public long getFileSize()
Returns the size in bytes of the file.- Returns:
- Returns the size in bytes of the file.
-
getDescription
public java.lang.String getDescription()
Returns the description of the file provided by the requester.- Returns:
- Returns the description of the file provided by the requester.
-
getMimeType
public java.lang.String getMimeType()
Returns the mime-type of the file.- Returns:
- Returns the mime-type of the file.
-
getRequestor
public Jid getRequestor()
Returns the fully-qualified jabber ID of the user that requested this file transfer.- Returns:
- Returns the fully-qualified jabber ID of the user that requested this file transfer.
-
getStreamID
public java.lang.String getStreamID()
Returns the stream ID that uniquely identifies this file transfer.- Returns:
- Returns the stream ID that uniquely identifies this file transfer.
-
getStreamInitiation
protected StreamInitiation getStreamInitiation()
Returns the stream initiation stanza that was sent by the requester which contains the parameters of the file transfer being transfer and also the methods available to transfer the file.- Returns:
- Returns the stream initiation stanza that was sent by the requester which contains the parameters of the file transfer being transfer and also the methods available to transfer the file.
-
accept
public IncomingFileTransfer accept()
Accepts this file transfer and creates the incoming file transfer.- Returns:
- Returns the IncomingFileTransfer on which the file transfer can be carried out.
-
reject
public void reject() throws SmackException.NotConnectedException, java.lang.InterruptedException
Rejects the file transfer request.- Throws:
SmackException.NotConnectedException
- if the XMPP connection is not connected.java.lang.InterruptedException
- if the calling thread was interrupted.
-
-