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.Configuration
configuration
The configuration for this serviceprotected String
name
The name of this Service.protected ServiceBroker
serviceBroker
A 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.Configuration
getConfiguration()
Returns the configuration of this Service.String
getName()
Returns the name of this service.Properties
getProperties()
Returns the properties of this Service.ServiceBroker
getServiceBroker()
Returns a ServiceBroker reference.void
setName(String name)
ServiceBroker uses this method to pass a Service its name.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.-
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:
setServiceBroker
in 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:
getProperties
in interfaceService
- Returns:
- The Properties of this Service.
-
getConfiguration
public org.apache.commons.configuration2.Configuration getConfiguration()
Returns the configuration of this Service.- Specified by:
getConfiguration
in interfaceService
- Returns:
- The Configuration of this Service.
-
-