public class DefaultProxyTransfer extends Object implements ProxyTransfer
| Constructor and Description |
|---|
DefaultProxyTransfer() |
| Modifier and Type | Method and Description |
|---|---|
void |
doTransfer()
Transfers the file from the initiator to the target.
|
long |
getAmountTransferred()
Returns the number of bytes that has been transferred.
|
int |
getCachedSize()
Returns the approximate size of the Object in bytes.
|
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.
|
String |
getTransferDigest()
Returns the transfer digest uniquely identifies a file transfer in the system.
|
boolean |
isActivatable()
Returns true if the Bytestream is ready to be activated and the proxy transfer can begin.
|
void |
setInitiator(String initiator) |
void |
setInputStream(InputStream initiatorInputStream) |
void |
setOutputStream(OutputStream outputStream) |
void |
setSessionID(String streamID) |
void |
setTarget(String target) |
void |
setTransferDigest(String transferDigest)
Sets the transfer digest for a file transfer.
|
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.
|
public String getInitiator()
FileTransferProgressgetInitiator in interface FileTransferProgresspublic void setInitiator(String initiator)
setInitiator in interface FileTransferProgresspublic InputStream getInputStream()
getInputStream in interface FileTransferProgresspublic void setInputStream(InputStream initiatorInputStream)
setInputStream in interface FileTransferProgresspublic OutputStream getOutputStream()
getOutputStream in interface FileTransferProgresspublic void setOutputStream(OutputStream outputStream)
setOutputStream in interface FileTransferProgresspublic String getTarget()
FileTransferProgressgetTarget in interface FileTransferProgresspublic void setTarget(String target)
setTarget in interface FileTransferProgresspublic String getTransferDigest()
ProxyTransfergetTransferDigest in interface ProxyTransferpublic void setTransferDigest(String transferDigest)
ProxyTransfersetTransferDigest in interface ProxyTransfertransferDigest - the digest which uniquely identifies this transfer.public String getSessionID()
FileTransferProgressgetSessionID in interface FileTransferProgresspublic void setSessionID(String streamID)
setSessionID in interface FileTransferProgresspublic boolean isActivatable()
ProxyTransferisActivatable in interface ProxyTransferpublic void setTransferFuture(Future<?> future)
FileTransferProgresssetTransferFuture in interface FileTransferProgressfuture - the furute that is carrying out the transferpublic long getAmountTransferred()
FileTransferProgressgetAmountTransferred in interface FileTransferProgresspublic void doTransfer()
throws IOException
ProxyTransferdoTransfer in interface ProxyTransferIOException - when an error occurs either reading from the input stream or
writing to the output stream.public int getCachedSize()
CacheablegetCachedSize in interface CacheableCopyright © 2003–2019 Ignite Realtime. All rights reserved.