Class HttpConnectionManagerFactory

java.lang.Object
net.sf.basedb.util.uri.http.HttpConnectionManagerFactory
All Implemented Interfaces:
Action, ConnectionManagerFactory

public class HttpConnectionManagerFactory extends Object implements ConnectionManagerFactory
Connection manager factory for HTTP and HTTPS URI:s. Auto-detection is supported for "http" and "https" URI:s.
Since:
3.0
Author:
Nicklas
See Also:
Last modified
$Date: 2011-03-31 13:38:56 +0200 (to, 31 mar 2011) $
  • Field Details

    • id

      private String id
    • name

      private String name
    • description

      private String description
  • Constructor Details

    • HttpConnectionManagerFactory

      public HttpConnectionManagerFactory()
      Create a new http connection manager factory.
  • Method Details

    • getId

      public String getId()
      Description copied from interface: ConnectionManagerFactory
      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.
      Specified by:
      getId in interface ConnectionManagerFactory
    • getDisplayName

      public String getDisplayName()
      Description copied from interface: ConnectionManagerFactory
      Get a short string that is suitable for use in selection lists, etc. in client applications.
      Specified by:
      getDisplayName in interface ConnectionManagerFactory
      Returns:
      A string
    • getDescription

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

      public boolean useAutoDetection()
      Description copied from interface: ConnectionManagerFactory
      Does this factory support auto-detection if an URI is supported or not?
      Specified by:
      useAutoDetection in interface ConnectionManagerFactory
    • supports

      public boolean supports(URI uri)
      Description copied from interface: ConnectionManagerFactory
      Check if the given factory knows how to create a handler for the given URI.
      Specified by:
      supports in interface ConnectionManagerFactory
      Parameters:
      uri - The URI to check
    • createConnectionManager

      public ConnectionManager createConnectionManager(URI uri, ConnectionParameters parameters)
      Description copied from interface: ConnectionManagerFactory
      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.

      Specified by:
      createConnectionManager in interface ConnectionManagerFactory
      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
    • init

      public void init(String id, String name, String description)
      Initialize this factory with some information.