Class BaseServiceImpl
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.fulcrum.yaafi.service.baseservice.BaseServiceImpl
- All Implemented Interfaces:
org.apache.avalon.framework.activity.Disposable,org.apache.avalon.framework.configuration.Configurable,org.apache.avalon.framework.configuration.Reconfigurable,org.apache.avalon.framework.context.Contextualizable,org.apache.avalon.framework.logger.LogEnabled,org.apache.avalon.framework.parameters.Parameterizable,org.apache.avalon.framework.service.Serviceable,BaseService
public abstract class BaseServiceImpl
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements BaseService
Base class for a service implementation capturing the Avalon
serviceConfiguration artifacts. Take care that using this class
introduces a dependency to the YAAFI library.
- Author:
- Siegfried Goeschl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(org.apache.avalon.framework.configuration.Configuration configuration) voidcontextualize(org.apache.avalon.framework.context.Context context) protected FilecreateAbsoluteFile(String fileName) Determines the absolute file based on the application directoryprotected StringcreateAbsolutePath(String fileName) Determines the absolute path based on the application directoryvoiddispose()protected Fileprotected ClassLoaderprotected org.apache.avalon.framework.configuration.Configurationprotected org.apache.avalon.framework.context.Contextprotected org.apache.avalon.framework.service.ServiceManagerprotected Stringprotected org.apache.avalon.framework.parameters.Parametersprotected Stringprotected Fileprotected booleanhasService(String key) protected Objectvoidparameterize(org.apache.avalon.framework.parameters.Parameters parameters) voidreconfigure(org.apache.avalon.framework.configuration.Configuration configuration) protected voidvoidservice(org.apache.avalon.framework.service.ServiceManager serviceManager) toString()Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.avalon.framework.logger.LogEnabled
enableLogging
-
Constructor Details
-
BaseServiceImpl
public BaseServiceImpl()Constructor
-
-
Method Details
-
contextualize
public void contextualize(org.apache.avalon.framework.context.Context context) throws org.apache.avalon.framework.context.ContextException - Specified by:
contextualizein interfaceorg.apache.avalon.framework.context.Contextualizable- Throws:
org.apache.avalon.framework.context.ContextException- See Also:
-
service
public void service(org.apache.avalon.framework.service.ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException - Specified by:
servicein interfaceorg.apache.avalon.framework.service.Serviceable- Throws:
org.apache.avalon.framework.service.ServiceException- See Also:
-
configure
public void configure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException - Specified by:
configurein interfaceorg.apache.avalon.framework.configuration.Configurable- Throws:
org.apache.avalon.framework.configuration.ConfigurationException- See Also:
-
parameterize
public void parameterize(org.apache.avalon.framework.parameters.Parameters parameters) throws org.apache.avalon.framework.parameters.ParameterException - Specified by:
parameterizein interfaceorg.apache.avalon.framework.parameters.Parameterizable- Throws:
org.apache.avalon.framework.parameters.ParameterException- See Also:
-
reconfigure
public void reconfigure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException - Specified by:
reconfigurein interfaceorg.apache.avalon.framework.configuration.Reconfigurable- Throws:
org.apache.avalon.framework.configuration.ConfigurationException- See Also:
-
dispose
public void dispose()- Specified by:
disposein interfaceorg.apache.avalon.framework.activity.Disposable- See Also:
-
toString
-
hasService
- Parameters:
key- name of the service to test for- Returns:
- boolean indicator if the service exists
- See Also:
-
lookup
- Parameters:
key- name of service to lookup from the service manager- Returns:
- reference to the service
- See Also:
-
release
- Parameters:
object- service to release- See Also:
-
createAbsoluteFile
Determines the absolute file based on the application directory- Parameters:
fileName- the filename- Returns:
- the absolute file
-
createAbsolutePath
Determines the absolute path based on the application directory- Parameters:
fileName- the filename- Returns:
- the absolute path
-
getServiceApplicationDir
- Returns:
- Returns the serviceApplicationDir.
-
getServiceClassLoader
- Returns:
- Returns the serviceClassLoader.
-
getServiceConfiguration
protected org.apache.avalon.framework.configuration.Configuration getServiceConfiguration()- Returns:
- Returns the serviceConfiguration.
-
getServiceContext
protected org.apache.avalon.framework.context.Context getServiceContext()- Returns:
- Returns the serviceContext.
-
getServiceManager
protected org.apache.avalon.framework.service.ServiceManager getServiceManager()- Returns:
- Returns the serviceManager.
-
getServiceName
- Returns:
- Returns the serviceName.
-
getServiceParameters
protected org.apache.avalon.framework.parameters.Parameters getServiceParameters()- Returns:
- Returns the serviceParameters.
-
getServicePartitionName
- Returns:
- Returns the servicePartitionName.
-
getServiceTempDir
- Returns:
- Returns the serviceTempDir.
-