|
Openfire 3.3.0 Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jivesoftware.openfire.filetransfer.proxy.DefaultProxyTransfer
public class DefaultProxyTransfer
Tracks the different connections related to a file transfer. There are two connections, the initiator and the target and when both connections are completed the transfer can begin.
| Constructor Summary | |
|---|---|
DefaultProxyTransfer()
|
|
| Method Summary | |
|---|---|
void |
doTransfer()
Transfers the file from the initiator to the target. |
long |
getAmountTransfered()
|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultProxyTransfer()
| Method Detail |
|---|
public String getInitiator()
FileTransferProgress
getInitiator 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()
FileTransferProgress
getTarget in interface FileTransferProgresspublic void setTarget(String target)
setTarget in interface FileTransferProgresspublic String getTransferDigest()
ProxyTransfer
getTransferDigest in interface ProxyTransferpublic void setTransferDigest(String transferDigest)
ProxyTransfer
setTransferDigest in interface ProxyTransfertransferDigest - the digest which uniquely identifies this transfer.public String getSessionID()
FileTransferProgress
getSessionID in interface FileTransferProgresspublic void setSessionID(String streamID)
setSessionID in interface FileTransferProgresspublic boolean isActivatable()
ProxyTransfer
isActivatable in interface ProxyTransferpublic void setTransferFuture(Future<?> future)
FileTransferProgress
setTransferFuture in interface FileTransferProgressfuture - the furute that is carrying out the transferpublic long getAmountTransfered()
getAmountTransfered in interface FileTransferProgress
public void doTransfer()
throws IOException
ProxyTransfer
doTransfer in interface ProxyTransferIOException - when an error occurs either reading from the input stream or
writing to the output stream.public int getCachedSize()
Cacheable
getCachedSize in interface Cacheable
|
Openfire 3.3.0 Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||