Smack

org.jivesoftware.smackx.filetransfer
Class FileTransferRequest

java.lang.Object
  extended by org.jivesoftware.smackx.filetransfer.FileTransferRequest

public class FileTransferRequest
extends Object

A request to send a file recieved from another user.

Author:
Alexander Wenckus

Constructor Summary
FileTransferRequest(FileTransferManager manager, StreamInitiation si)
          A recieve request is constructed from the Stream Initiation request received from the initator.
 
Method Summary
 IncomingFileTransfer accept()
          Accepts this file transfer and creates the incoming file transfer.
 String getDescription()
          Returns the description of the file provided by the requestor.
 String getFileName()
          Returns the name of the file.
 long getFileSize()
          Returns the size in bytes of the file.
 String getMimeType()
          Returns the mime-type of the file.
 String getRequestor()
          Returns the fully-qualified jabber ID of the user that requested this file transfer.
 String getStreamID()
          Returns the stream ID that uniquely identifies this file transfer.
protected  StreamInitiation getStreamInitiation()
          Returns the stream initiation packet that was sent by the requestor 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileTransferRequest

public FileTransferRequest(FileTransferManager manager,
                           StreamInitiation si)
A recieve request is constructed from the Stream Initiation request received from the initator.

Parameters:
manager - The manager handling this file transfer
si - The Stream initiaton recieved from the initiator.
Method Detail

getFileName

public 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 String getDescription()
Returns the description of the file provided by the requestor.

Returns:
Returns the description of the file provided by the requestor.

getMimeType

public String getMimeType()
Returns the mime-type of the file.

Returns:
Returns the mime-type of the file.

getRequestor

public String 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 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 packet that was sent by the requestor which contains the parameters of the file transfer being transfer and also the methods available to transfer the file.

Returns:
Returns the stream initiation packet that was sent by the requestor 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()
Rejects the file transfer request.


Smack

Copyright © 2003-2007 Jive Software.