3.0.4: 2012-03-05

net.sf.basedb.util.uri
Interface ConnectionManager

All Known Implementing Classes:
HttpConnectionManager

public interface ConnectionManager

A connection manager is used to access the contents and metadata about the resource pointed to by a given URI. Connection managers are usually created by ConnectionManagerFactory objects. Implementations doesn't have to be thread-safe since a new connection manager is created for each use of an URI. Implementations doens't have to provide a public no-argument constructor.

Since:
3.0
Author:
Nicklas
Last modified
$Date: 2011-03-15 13:55:59 +0100 (Tue, 15 Mar 2011) $

Method Summary
 InputStream getInputStream()
          Get an InputStream for reading the contents of the resource.
 UriMetadata getMetadata()
          Get metadata about the resource.
 URI getURI()
          Get the URI of the resource we are interested in.
 

Method Detail

getURI

URI getURI()
Get the URI of the resource we are interested in.

Returns:
An URI

getInputStream

InputStream getInputStream()
                           throws IOException
Get an InputStream for reading the contents of the resource.

Returns:
An InputStream object, or null if the no data is available
Throws:
IOException - If there is an error creating the stream

getMetadata

UriMetadata getMetadata()
                        throws IOException
Get metadata about the resource. If no metadata can be obtained the handler should still create an empty UriMetadata object.

Returns:
A metadata object
Throws:
IOException - If there is an error getting the metadata

3.0.4: 2012-03-05