public class OutgoingFileTransferJabberImpl extends AbstractFileTransfer implements org.jivesoftware.smack.PacketInterceptor
IN, OUT
Constructor and Description |
---|
OutgoingFileTransferJabberImpl(Contact receiver,
java.io.File file,
org.jivesoftware.smackx.filetransfer.OutgoingFileTransfer jabberTransfer,
ProtocolProviderServiceJabberImpl protocolProvider)
Creates an OutgoingFileTransferJabberImpl by specifying the
receiver contact, the file, the jabberTransfer,
that would be used to send the file through Jabber and the
protocolProvider.
|
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancels the file transfer.
|
Contact |
getContact()
The contact we are sending the file.
|
int |
getDirection()
The direction is outgoing.
|
java.lang.String |
getID()
The unique id.
|
java.io.File |
getLocalFile()
Returns the local file that is being transferred or to which we transfer.
|
long |
getTransferedBytes()
Returns the number of bytes already sent to the recipient.
|
void |
interceptPacket(org.jivesoftware.smack.packet.Packet packet)
Listens for all StreamInitiation packets and adds a thumbnail
to them if a thumbnailed file is supported.
|
void |
removeThumbnailRequestListener()
Removes previously added thumbnail request listener.
|
addProgressListener, addStatusListener, fireProgressChangeEvent, fireStatusChangeEvent, fireStatusChangeEvent, getStatus, removeProgressListener, removeStatusListener
public OutgoingFileTransferJabberImpl(Contact receiver, java.io.File file, org.jivesoftware.smackx.filetransfer.OutgoingFileTransfer jabberTransfer, ProtocolProviderServiceJabberImpl protocolProvider)
receiver
- the destination contactfile
- the file to sendjabberTransfer
- the Jabber transfer object, containing all transfer
informationprotocolProvider
- the parent protocol providerpublic void cancel()
cancel
in interface FileTransfer
cancel
in class AbstractFileTransfer
public long getTransferedBytes()
getTransferedBytes
in interface FileTransfer
getTransferedBytes
in class AbstractFileTransfer
public int getDirection()
getDirection
in interface FileTransfer
public java.io.File getLocalFile()
getLocalFile
in interface FileTransfer
public Contact getContact()
getContact
in interface FileTransfer
public java.lang.String getID()
getID
in interface FileTransfer
public void removeThumbnailRequestListener()
public void interceptPacket(org.jivesoftware.smack.packet.Packet packet)
interceptPacket
in interface org.jivesoftware.smack.PacketInterceptor
PacketInterceptor.interceptPacket(Packet)
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.