Interface FileTransferProgress
- All Known Subinterfaces:
ProxyTransfer
- All Known Implementing Classes:
DefaultProxyTransfer
public interface FileTransferProgress
An interface to track the progress of a file transfer through the server. This interface is used
by
FileTransfer
to make this information available if it is in the system.- Author:
- Alexander Wenckus
-
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the number of bytes that has been transferred.Returns the fully qualified JID of the initiator of the file transfer.Returns the unique session id that correlates to the file transfer.Returns the full qualified JID of the target of the file transfer.void
setInitiator
(String initiator) void
setInputStream
(InputStream initiatorInputStream) void
setOutputStream
(OutputStream targetOutputStream) void
setSessionID
(String streamID) void
void
setTransferFuture
(Future<?> future) When the file transfer is being carried out by another thread this will set the Future relating to the thread that is carrying out the transfer.
-
Method Details
-
getAmountTransferred
Returns the number of bytes that has been transferred.- Returns:
- the number of bytes that has been transferred.
- Throws:
UnsupportedOperationException
- if this information cannot be retrieved
-
getInitiator
String getInitiator()Returns the fully qualified JID of the initiator of the file transfer.- Returns:
- the fully qualified JID of the initiator of the file transfer.
-
setInitiator
-
getTarget
String getTarget()Returns the full qualified JID of the target of the file transfer.- Returns:
- the fully qualified JID of the target
-
setTarget
-
getSessionID
String getSessionID()Returns the unique session id that correlates to the file transfer.- Returns:
- Returns the unique session id that correlates to the file transfer.
-
setSessionID
-
setTransferFuture
When the file transfer is being carried out by another thread this will set the Future relating to the thread that is carrying out the transfer.- Parameters:
future
- the future that is carrying out the transfer
-
setInputStream
-
getInputStream
InputStream getInputStream() -
setOutputStream
-
getOutputStream
OutputStream getOutputStream()
-