org.apache.turbine.services.db
Interface MapBrokerService

All Superinterfaces:
Initable, Service
All Known Implementing Classes:
TurbineMapBrokerService

public interface MapBrokerService
extends Service

This service manages DatabaseMap objects used throughout a Turbine application. It provides single point of access to a pool of maps, assuring that every client will access the same instance of DatabaseMap object.

Version:
$Id: MapBrokerService.java,v 1.2 2001/09/27 05:22:31 jvanzyl Exp $
Author:
Rafal Krzewski

Field Summary
static java.lang.String DEFAULT
          Name of the default map builder and map.
static java.lang.String DEFAULT_MAP
          Name of default map property
static java.lang.String SERVICE_NAME
           
 
Method Summary
 DatabaseMap getDatabaseMap()
          Returns the default database map information.
 DatabaseMap getDatabaseMap(java.lang.String name)
          Returns the database map information.
 java.lang.String getDefaultMap()
          Return default map
 
Methods inherited from interface org.apache.turbine.services.Service
getConfiguration, getName, getProperties, setName, setServiceBroker
 
Methods inherited from interface org.apache.turbine.services.Initable
getInit, init, init, setInitableBroker, shutdown
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME

DEFAULT

public static final java.lang.String DEFAULT
Name of the default map builder and map.

DEFAULT_MAP

public static final java.lang.String DEFAULT_MAP
Name of default map property
Method Detail

getDefaultMap

public java.lang.String getDefaultMap()
Return default map

getDatabaseMap

public DatabaseMap getDatabaseMap()
                           throws TurbineException
Returns the default database map information.
Returns:
A DatabaseMap.
Throws:
TurbineException - Any exceptions caught during procssing will be rethrown wrapped into a TurbineException.

getDatabaseMap

public DatabaseMap getDatabaseMap(java.lang.String name)
                           throws TurbineException
Returns the database map information. Name relates to the name of the connection pool to associate with the map.
Parameters:
name - The name of the DatabaseMap to retrieve.
Returns:
The named DatabaseMap.
Throws:
TurbineException - Any exceptions caught during procssing will be rethrown wrapped into a TurbineException.


Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.