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 TypeMethodDescriptionvoid
configure
(org.apache.avalon.framework.configuration.Configuration configuration) void
contextualize
(org.apache.avalon.framework.context.Context context) protected File
createAbsoluteFile
(String fileName) Determines the absolute file based on the application directoryprotected String
createAbsolutePath
(String fileName) Determines the absolute path based on the application directoryvoid
dispose()
protected File
protected ClassLoader
protected org.apache.avalon.framework.configuration.Configuration
protected org.apache.avalon.framework.context.Context
protected org.apache.avalon.framework.service.ServiceManager
protected String
protected org.apache.avalon.framework.parameters.Parameters
protected String
protected File
protected boolean
hasService
(String key) protected Object
void
parameterize
(org.apache.avalon.framework.parameters.Parameters parameters) void
reconfigure
(org.apache.avalon.framework.configuration.Configuration configuration) protected void
void
service
(org.apache.avalon.framework.service.ServiceManager serviceManager) toString()
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
contextualize
in 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:
service
in 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:
configure
in 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:
parameterize
in 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:
reconfigure
in interfaceorg.apache.avalon.framework.configuration.Reconfigurable
- Throws:
org.apache.avalon.framework.configuration.ConfigurationException
- See Also:
-
dispose
public void dispose()- Specified by:
dispose
in 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.
-