3.0.4: 2012-03-05

net.sf.basedb.util.uri
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: 2011-03-31 13:38:56 +0200 (Thu, 31 Mar 2011) $

Method Summary
 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 Detail

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.

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

3.0.4: 2012-03-05