|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.turbine.services.BaseInitable
org.apache.turbine.services.BaseService
org.apache.turbine.services.TurbineBaseService
org.apache.turbine.services.avaloncomponent.TurbineYaafiComponentService
public class TurbineYaafiComponentService
An implementation of Turbine service initializing the YAAFI container
| Field Summary | |
|---|---|
static String |
COMPONENT_PARAMETERS_KEY
property to lookup the properties file |
static String |
COMPONENT_PARAMETERS_VALUE
the default value for the parameter file |
static String |
CONTAINER_CONFIGURATION_KEY
property to lookup the container configuration file |
static String |
CONTAINER_CONFIGURATION_VALUE
the default value for the container configuration file |
| Fields inherited from class org.apache.turbine.services.BaseService |
|---|
configuration, name, serviceBroker |
| Fields inherited from class org.apache.turbine.services.BaseInitable |
|---|
initableBroker, isInitialized |
| Fields inherited from interface org.apache.turbine.services.avaloncomponent.AvalonComponentService |
|---|
AVALON_LOG_CATEGORY, COMPONENT_APP_ROOT, COMPONENT_CONFIG_KEY, COMPONENT_CONFIG_VALUE, COMPONENT_LOOKUP_KEY, COMPONENT_ROLE_KEY, COMPONENT_ROLE_VALUE, SERVICE_NAME |
| Constructor Summary | |
|---|---|
TurbineYaafiComponentService()
|
|
| Method Summary | |
|---|---|
protected org.apache.avalon.framework.logger.Logger |
createAvalonLogger()
Create the Avalon logger to be passed to YAAFI |
protected org.apache.fulcrum.yaafi.framework.factory.ServiceContainerConfiguration |
createServiceContainerConfiguration(org.apache.commons.configuration.Configuration conf)
Create a ServiceContainerConfiguration based on the Turbine configuration |
void |
dispose()
Disposes of the container and releases resources |
boolean |
exists(String roleName)
Is the service known to the service container? |
Object |
get(String roleName)
Returns an instance of the requested service. |
boolean |
hasService(String roleName)
|
void |
init()
Load all configured components and initialize them. |
void |
initialize()
Initializes the container |
Object |
lookup(String roleName)
Returns an instance of the named component |
void |
release(Object component)
Releases the component. |
void |
shutdown()
Shuts the Component Service down, calls dispose on the components that implement this interface |
| Methods inherited from class org.apache.turbine.services.TurbineBaseService |
|---|
init, init, init |
| Methods inherited from class org.apache.turbine.services.BaseService |
|---|
getConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBroker |
| Methods inherited from class org.apache.turbine.services.BaseInitable |
|---|
getInit, getInitableBroker, setInit, setInitableBroker |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 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, setInitableBroker |
| Field Detail |
|---|
public static final String CONTAINER_CONFIGURATION_KEY
public static final String CONTAINER_CONFIGURATION_VALUE
public static final String COMPONENT_PARAMETERS_KEY
public static final String COMPONENT_PARAMETERS_VALUE
| Constructor Detail |
|---|
public TurbineYaafiComponentService()
| Method Detail |
|---|
public void init()
throws InitializationException
init in interface Initableinit in class TurbineBaseServiceInitializationException - Something went wrong in the init stagepublic void shutdown()
shutdown in interface Initableshutdown in class TurbineBaseService
public void initialize()
throws Exception
initialize in interface org.apache.avalon.framework.activity.InitializableException - generic exceptionpublic void dispose()
dispose in interface org.apache.avalon.framework.activity.Disposable
public Object lookup(String roleName)
throws org.apache.avalon.framework.service.ServiceException
lookup in interface org.apache.avalon.framework.service.ServiceManagerroleName - Name of the role the component fills.
Exception - generic exception
org.apache.avalon.framework.service.ServiceExceptionpublic void release(Object component)
release in interface org.apache.avalon.framework.service.ServiceManagerrelease in interface TurbineServiceProvidercomponent - the component to releasepublic boolean hasService(String roleName)
hasService in interface org.apache.avalon.framework.service.ServiceManagerServiceManager.hasService(java.lang.String)
protected org.apache.fulcrum.yaafi.framework.factory.ServiceContainerConfiguration createServiceContainerConfiguration(org.apache.commons.configuration.Configuration conf)
throws IOException
conf - the Turbine configuration
IOException - creating the YAAFI configuration failedprotected org.apache.avalon.framework.logger.Logger createAvalonLogger()
public boolean exists(String roleName)
TurbineServiceProvider
exists in interface TurbineServiceProviderTurbineServiceProvider.exists(java.lang.String)
public Object get(String roleName)
throws InstantiationException
TurbineServiceProvider
get in interface TurbineServiceProviderroleName - the name of the requested service
InstantiationException - the service could not be instantiatedTurbineServiceProvider.get(java.lang.String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||