3.0.1: 2011-11-10

net.sf.basedb.util.uri.http
Class HttpConnectionManagerFactory

java.lang.Object
  extended by 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:
HttpConnectionManager
Last modified
$Date: 2011-03-31 13:38:56 +0200 (Thu, 31 Mar 2011) $

Field Summary
private  String description
           
private  String id
           
private  String name
           
 
Constructor Summary
HttpConnectionManagerFactory()
          Create a new http connection manager factory.
 
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.
 void init(String id, String name, String description)
          Initialize this factory with some information.
 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?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

private String id

name

private String name

description

private String description
Constructor Detail

HttpConnectionManagerFactory

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

Method Detail

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.

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.


3.0.1: 2011-11-10