Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.9.3 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Field Summary

Fields inherited from interface org.jivesoftware.openfire.filetransfer.FileTransferManager
`NAMESPACE_BYTESTREAMS, NAMESPACE_SI, NAMESPACE_SI_FILETRANSFER`

Constructor Summary
`DefaultFileTransferManager()` Default constructor creates the cache.

Method Summary
`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)`

Methods inherited from class org.jivesoftware.openfire.container.BasicModule
`destroy, getName, initialize, start, stop`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.jivesoftware.openfire.container.Module
`destroy, getName, initialize, start, stop`

Constructor Detail

### DefaultFileTransferManager

    public DefaultFileTransferManager()

  Default constructor creates the cache.

Method Detail

### 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 transfer
    `proxyTransfer` - 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`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.9.3 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2008 Jive Software.