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 byFileTransfer
to make this information available if it is in the system.- Author:
- Alexander Wenckus
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
getAmountTransferred()
Returns the number of bytes that has been transferred.String
getInitiator()
Returns the fully qualified JID of the initiator of the file transfer.InputStream
getInputStream()
OutputStream
getOutputStream()
String
getSessionID()
Returns the unique session id that correlates to the file transfer.String
getTarget()
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
setTarget(String target)
void
setTransferFuture(Future<?> future)
When the file transfer is being caried out by another thread this will set the Future relating to the thread that is carrying out the transfer.
-
-
-
Method Detail
-
getAmountTransferred
long getAmountTransferred() throws UnsupportedOperationException
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
void setInitiator(String initiator)
-
getTarget
String getTarget()
Returns the full qualified JID of the target of the file transfer.- Returns:
- the fully qualified JID of the target
-
setTarget
void setTarget(String target)
-
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
void setSessionID(String streamID)
-
setTransferFuture
void setTransferFuture(Future<?> future)
When the file transfer is being caried out by another thread this will set the Future relating to the thread that is carrying out the transfer.- Parameters:
future
- the furute that is carrying out the transfer
-
setInputStream
void setInputStream(InputStream initiatorInputStream)
-
getInputStream
InputStream getInputStream()
-
setOutputStream
void setOutputStream(OutputStream targetOutputStream)
-
getOutputStream
OutputStream getOutputStream()
-
-