|
Openfire 3.4.3 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 FileTransferProgress
public void setInitiator(String initiator)
setInitiator
in interface FileTransferProgress
public InputStream getInputStream()
getInputStream
in interface FileTransferProgress
public void setInputStream(InputStream initiatorInputStream)
setInputStream
in interface FileTransferProgress
public OutputStream getOutputStream()
getOutputStream
in interface FileTransferProgress
public void setOutputStream(OutputStream outputStream)
setOutputStream
in interface FileTransferProgress
public String getTarget()
FileTransferProgress
getTarget
in interface FileTransferProgress
public void setTarget(String target)
setTarget
in interface FileTransferProgress
public String getTransferDigest()
ProxyTransfer
getTransferDigest
in interface ProxyTransfer
public void setTransferDigest(String transferDigest)
ProxyTransfer
setTransferDigest
in interface ProxyTransfer
transferDigest
- the digest which uniquely identifies this transfer.public String getSessionID()
FileTransferProgress
getSessionID
in interface FileTransferProgress
public void setSessionID(String streamID)
setSessionID
in interface FileTransferProgress
public boolean isActivatable()
ProxyTransfer
isActivatable
in interface ProxyTransfer
public void setTransferFuture(Future<?> future)
FileTransferProgress
setTransferFuture
in interface FileTransferProgress
future
- the furute that is carrying out the transferpublic long getAmountTransfered()
getAmountTransfered
in interface FileTransferProgress
public void doTransfer() throws IOException
ProxyTransfer
doTransfer
in interface ProxyTransfer
IOException
- 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.4.3 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |