Package org.apache.turbine.services
Class BaseService
- java.lang.Object
-
- org.apache.turbine.services.BaseInitable
-
- org.apache.turbine.services.BaseService
-
- Direct Known Subclasses:
TurbineBaseService
public class BaseService extends BaseInitable implements Service
This class is a generic implementation ofService.- Version:
- $Id$
- Author:
- Kevin Burton, Rafal Krzewski, Henning P. Schmiedehausen
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.commons.configuration2.ConfigurationconfigurationThe configuration for this serviceprotected StringnameThe name of this Service.protected ServiceBrokerserviceBrokerA reference to the ServiceBroker that instantiated this object.-
Fields inherited from class org.apache.turbine.services.BaseInitable
initableBroker, isInitialized
-
Fields inherited from interface org.apache.turbine.services.Service
SERVICE_NAME
-
-
Constructor Summary
Constructors Constructor Description BaseService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.commons.configuration2.ConfigurationgetConfiguration()Returns the configuration of this Service.StringgetName()Returns the name of this service.PropertiesgetProperties()Returns the properties of this Service.ServiceBrokergetServiceBroker()Returns a ServiceBroker reference.voidsetName(String name)ServiceBroker uses this method to pass a Service its name.voidsetServiceBroker(ServiceBroker broker)Saves a reference to the ServiceBroker that instantiated this object, so that it can ask for its properties and access other Services.-
Methods inherited from class org.apache.turbine.services.BaseInitable
getInit, getInitableBroker, init, init, setInit, setInitableBroker, shutdown
-
-
-
-
Field Detail
-
serviceBroker
protected ServiceBroker serviceBroker
A reference to the ServiceBroker that instantiated this object.
-
configuration
protected org.apache.commons.configuration2.Configuration configuration
The configuration for this service
-
-
Constructor Detail
-
BaseService
public BaseService()
-
-
Method Detail
-
setServiceBroker
public void setServiceBroker(ServiceBroker broker)
Saves a reference to the ServiceBroker that instantiated this object, so that it can ask for its properties and access other Services.- Specified by:
setServiceBrokerin interfaceService- Parameters:
broker- The ServiceBroker that instantiated this object.
-
setName
public void setName(String name)
ServiceBroker uses this method to pass a Service its name.
-
getServiceBroker
public ServiceBroker getServiceBroker()
Returns a ServiceBroker reference.- Returns:
- The ServiceBroker that instantiated this object.
-
getProperties
public Properties getProperties()
Returns the properties of this Service.- Specified by:
getPropertiesin interfaceService- Returns:
- The Properties of this Service.
-
getConfiguration
public org.apache.commons.configuration2.Configuration getConfiguration()
Returns the configuration of this Service.- Specified by:
getConfigurationin interfaceService- Returns:
- The Configuration of this Service.
-
-