public interface OperationSetFileTransfer extends OperationSet
Modifier and Type | Method and Description |
---|---|
void |
addFileTransferListener(FileTransferListener listener)
Adds the given FileTransferListener that would listen for
file transfer requests and created file transfers.
|
long |
getMaximumFileLength()
Returns the maximum file length supported by the protocol in bytes.
|
void |
removeFileTransferListener(FileTransferListener listener)
Removes the given FileTransferListener that listens for
file transfer requests and created file transfers.
|
FileTransfer |
sendFile(Contact toContact,
Contact fromContact,
java.lang.String remotePath,
java.lang.String localPath)
Sends a file transfer request to the given toContact by
specifying the local and remote file path and the fromContact,
sending the file.
|
FileTransfer |
sendFile(Contact toContact,
java.io.File file)
Sends a file transfer request to the given toContact by
specifying the local and remote file path and the fromContact,
sending the file.
|
FileTransfer sendFile(Contact toContact, java.io.File file) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException, OperationNotSupportedException
toContact
- the contact that should receive the filefile
- the file to sendjava.lang.IllegalStateException
- if the protocol provider is not registered
or connectedjava.lang.IllegalArgumentException
- if some of the arguments doesn't fit the
protocol requirementsOperationNotSupportedException
- if the given contact client or
server does not support file transfersFileTransfer sendFile(Contact toContact, Contact fromContact, java.lang.String remotePath, java.lang.String localPath) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException, OperationNotSupportedException
toContact
- the contact that should receive the filefromContact
- the contact sending the fileremotePath
- the remote file pathlocalPath
- the local file pathjava.lang.IllegalStateException
- if the protocol provider is not registered
or connectedjava.lang.IllegalArgumentException
- if some of the arguments doesn't fit the
protocol requirementsOperationNotSupportedException
- if the given contact client or
server does not support file transfers.void addFileTransferListener(FileTransferListener listener)
listener
- the FileTransferListener to addvoid removeFileTransferListener(FileTransferListener listener)
listener
- the FileTransferListener to removelong getMaximumFileLength()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.