org.apache.turbine.services.intake
Class TurbineIntake

java.lang.Object
  extended byorg.apache.turbine.services.intake.TurbineIntake

public abstract class TurbineIntake
extends java.lang.Object

This is a Facade class for IntakeService. This class provides static methods that call related methods of the implementation of the IntakeService used by the System, according to the settings in TurbineResources.

Version:
$Id: TurbineIntake.java 534527 2007-05-02 16:10:59Z tv $
Author:
John McNally, Quinton McCombs

Constructor Summary
TurbineIntake()
           
 
Method Summary
static java.lang.reflect.Method getFieldGetter(java.lang.String className, java.lang.String propName)
          Gets the Method that can be used to get a property value.
static java.lang.reflect.Method getFieldSetter(java.lang.String className, java.lang.String propName)
          Gets the Method that can be used to set a property.
static Group getGroup(java.lang.String groupName)
          Gets an instance of a named group either from the pool or by calling the Factory Service if the pool is empty.
static java.lang.String getGroupKey(java.lang.String groupName)
          Gets the key (usually a short identifier) for a group.
static java.lang.String getGroupName(java.lang.String groupKey)
          Gets the group name given its key.
static java.lang.String[] getGroupNames()
          Names of all the defined groups.
static int getSize(java.lang.String groupName)
          Gets the current size of the pool for a named group.
static void releaseGroup(Group instance)
          Puts a group back to the pool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TurbineIntake

public TurbineIntake()
Method Detail

getGroup

public static Group getGroup(java.lang.String groupName)
                      throws IntakeException
Gets an instance of a named group either from the pool or by calling the Factory Service if the pool is empty.

Parameters:
groupName - the name of the group.
Returns:
a Group instance.
Throws:
IntakeException - if recycling fails.

releaseGroup

public static void releaseGroup(Group instance)
                         throws IntakeException
Puts a group back to the pool.

Parameters:
instance - the object instance to recycle.
Throws:
IntakeException - A non existant group was passed

getSize

public static int getSize(java.lang.String groupName)
                   throws IntakeException
Gets the current size of the pool for a named group.

Parameters:
groupName - the name of the group.
Returns:
the current pool size
Throws:
IntakeException - A non existant group was passed

getGroupNames

public static java.lang.String[] getGroupNames()
Names of all the defined groups.

Returns:
array of names.

getGroupKey

public static java.lang.String getGroupKey(java.lang.String groupName)
Gets the key (usually a short identifier) for a group.

Parameters:
groupName - the name of the group.
Returns:
the the key.

getGroupName

public static java.lang.String getGroupName(java.lang.String groupKey)
Gets the group name given its key.

Parameters:
groupKey - the key.
Returns:
groupName the name of the group.

getFieldSetter

public static java.lang.reflect.Method getFieldSetter(java.lang.String className,
                                                      java.lang.String propName)
                                               throws java.beans.IntrospectionException,
                                                      java.lang.ClassNotFoundException
Gets the Method that can be used to set a property.

Parameters:
className - the name of the object.
propName - the name of the property.
Returns:
the setter.
Throws:
java.lang.ClassNotFoundException
java.beans.IntrospectionException

getFieldGetter

public static java.lang.reflect.Method getFieldGetter(java.lang.String className,
                                                      java.lang.String propName)
                                               throws java.beans.IntrospectionException,
                                                      java.lang.ClassNotFoundException
Gets the Method that can be used to get a property value.

Parameters:
className - the name of the object.
propName - the name of the property.
Returns:
the getter.
Throws:
java.lang.ClassNotFoundException
java.beans.IntrospectionException


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