org.jivesoftware.openfire.filetransfer
Class DefaultFileTransferManager
java.lang.Object
org.jivesoftware.openfire.container.BasicModule
org.jivesoftware.openfire.filetransfer.DefaultFileTransferManager
- All Implemented Interfaces:
- Module, FileTransferManager
public class DefaultFileTransferManager
- extends BasicModule
- implements FileTransferManager
Provides several utility methods for file transfer manager implementaions to utilize.
- Author:
- Alexander Wenckus
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultFileTransferManager
public DefaultFileTransferManager()
- Default constructor creates the cache.
isMatchProxyTransfer
public boolean isMatchProxyTransfer()
- Returns true if the proxy transfer should be matched to an existing file transfer
in the system.
- Returns:
- Returns true if the proxy transfer should be matched to an existing file
transfer in the system.
cacheFileTransfer
protected void cacheFileTransfer(String key,
FileTransfer transfer)
retrieveFileTransfer
protected FileTransfer retrieveFileTransfer(String key)
getChildElement
protected static org.dom4j.Element getChildElement(org.dom4j.Element element,
String namespace)
acceptIncomingFileTransferRequest
public boolean acceptIncomingFileTransferRequest(FileTransfer transfer)
throws FileTransferRejectedException
- Description copied from interface:
FileTransferManager
- Checks an incoming file transfer request to see if it should be accepted or rejected.
If it is accepted true will be returned and if it is rejected false will be returned.
- Specified by:
acceptIncomingFileTransferRequest
in interface FileTransferManager
- Parameters:
transfer
- the transfer to test for acceptance
- Returns:
- true if it should be accepted false if it should not.
- Throws:
FileTransferRejectedException
registerProxyTransfer
public void registerProxyTransfer(String transferDigest,
ProxyTransfer proxyTransfer)
throws UnauthorizedException
- Description copied from interface:
FileTransferManager
- Registers that a transfer has begun through the proxy connected to the server.
- Specified by:
registerProxyTransfer
in interface FileTransferManager
- Parameters:
transferDigest
- the digest of the initiator + target + sessionID that uniquely
identifies a file transferproxyTransfer
- the related proxy transfer.
- Throws:
UnauthorizedException
- when in the current server configuration this transfer
should not be permitted.
addFileTransferInterceptor
public void addFileTransferInterceptor(FileTransferInterceptor interceptor)
- Specified by:
addFileTransferInterceptor
in interface FileTransferManager
removeFileTransferInterceptor
public void removeFileTransferInterceptor(FileTransferInterceptor interceptor)
- Specified by:
removeFileTransferInterceptor
in interface FileTransferManager
fireFileTransferIntercept
public void fireFileTransferIntercept(FileTransferProgress transfer,
boolean isReady)
throws FileTransferRejectedException
- Specified by:
fireFileTransferIntercept
in interface FileTransferManager
- Throws:
FileTransferRejectedException
Copyright © 2003-2008 Jive Software.