Interface ConnectionManagerFactory

All Superinterfaces:
Action
All Known Implementing Classes:
HttpConnectionManagerFactory

public interface ConnectionManagerFactory
extends Action
A connection manager factory is responsible for creating connection managers for some subset of URI:s that is supported. A factory implementation must be thread-safe since it may be used by more than one thread at a time.
Since:
3.0
Author:
Nicklas
Last modified
$Date: 2014-06-26 08:48:25 +0200 (to, 26 jun 2014) $
  • Method Summary

    Modifier and Type Method Description
    ConnectionManager createConnectionManager​(URI uri, ConnectionParameters parameters)
    Create a new handler for accessing the resource at the given URI.
    String getDescription()
    Get a longer description that can be used by client applications to show more information about the capabilities of the factory to the users.
    String getDisplayName()
    Get a short string that is suitable for use in selection lists, etc.
    String getId()
    Get the ID of this connection manager factory.
    boolean supports​(URI uri)
    Check if the given factory knows how to create a handler for the given URI.
    boolean useAutoDetection()
    Does this factory support auto-detection if an URI is supported or not?
  • Method Details

    • getId

      String getId()
      Get the ID of this connection manager factory. This should be a unique string matching the id of extension that has been registered with BASE.
    • getDisplayName

      String getDisplayName()
      Get a short string that is suitable for use in selection lists, etc. in client applications.
      Returns:
      A string
    • getDescription

      String getDescription()
      Get a longer description that can be used by client applications to show more information about the capabilities of the factory to the users.
      Returns:
      A string or null if no more information is available
    • useAutoDetection

      boolean useAutoDetection()
      Does this factory support auto-detection if an URI is supported or not?
    • supports

      boolean supports​(URI uri)
      Check if the given factory knows how to create a handler for the given URI.
      Parameters:
      uri - The URI to check
    • createConnectionManager

      ConnectionManager createConnectionManager​(URI uri, ConnectionParameters parameters)
      Create a new handler for accessing the resource at the given URI. Unless otherwise noted it is expected that this method create a new connection manager for each call.

      NOTE! Also consider if it is possible for the connection manager to implement the ResumableConnectionManager interface. This will improve support for resuming downloads at a specified location.

      Parameters:
      uri - The URI to access (required)
      parameters - Connection parameters, such as user login/password, etc. Optional, unless otherwise is noted by the implementation.
      Returns:
      An URI handler