public class DefaultFileTransferManager extends BasicModule implements FileTransferManager
NAMESPACE_BYTESTREAMS, NAMESPACE_SI, NAMESPACE_SI_FILETRANSFER
Constructor and Description |
---|
DefaultFileTransferManager()
Default constructor creates the cache.
|
Modifier and Type | Method and Description |
---|---|
boolean |
acceptIncomingFileTransferRequest(FileTransfer transfer)
Checks an incoming file transfer request to see if it should be accepted or rejected.
|
void |
addFileTransferInterceptor(FileTransferInterceptor interceptor) |
protected void |
cacheFileTransfer(String key,
FileTransfer transfer) |
void |
fireFileTransferIntercept(FileTransferProgress transfer,
boolean isReady) |
protected static org.dom4j.Element |
getChildElement(org.dom4j.Element element,
String namespace) |
boolean |
isMatchProxyTransfer()
Returns true if the proxy transfer should be matched to an existing file transfer
in the system.
|
void |
registerProxyTransfer(String transferDigest,
ProxyTransfer proxyTransfer)
Registers that a transfer has begun through the proxy connected to the server.
|
void |
removeFileTransferInterceptor(FileTransferInterceptor interceptor) |
protected FileTransfer |
retrieveFileTransfer(String key) |
destroy, getName, initialize, start, stop
public DefaultFileTransferManager()
public boolean isMatchProxyTransfer()
protected void cacheFileTransfer(String key, FileTransfer transfer)
protected FileTransfer retrieveFileTransfer(String key)
protected static org.dom4j.Element getChildElement(org.dom4j.Element element, String namespace)
public boolean acceptIncomingFileTransferRequest(FileTransfer transfer) throws FileTransferRejectedException
FileTransferManager
acceptIncomingFileTransferRequest
in interface FileTransferManager
transfer
- the transfer to test for acceptanceFileTransferRejectedException
public void registerProxyTransfer(String transferDigest, ProxyTransfer proxyTransfer) throws UnauthorizedException
FileTransferManager
registerProxyTransfer
in interface FileTransferManager
transferDigest
- the digest of the initiator + target + sessionID that uniquely
identifies a file transferproxyTransfer
- the related proxy transfer.UnauthorizedException
- when in the current server configuration this transfer
should not be permitted.public void addFileTransferInterceptor(FileTransferInterceptor interceptor)
addFileTransferInterceptor
in interface FileTransferManager
public void removeFileTransferInterceptor(FileTransferInterceptor interceptor)
removeFileTransferInterceptor
in interface FileTransferManager
public void fireFileTransferIntercept(FileTransferProgress transfer, boolean isReady) throws FileTransferRejectedException
fireFileTransferIntercept
in interface FileTransferManager
FileTransferRejectedException
Copyright © 2003-2008 Jive Software.