org.apache.turbine.services
Class BaseService
java.lang.Object
|
+--org.apache.turbine.services.BaseInitable
|
+--org.apache.turbine.services.BaseService
- All Implemented Interfaces:
- Initable, Service
- Direct Known Subclasses:
- TurbineBaseService, TurbineMapBrokerService, TurbinePoolBrokerService
- public class BaseService
- extends BaseInitable
- implements Service
This class is a generic implementation of Service
.
- Version:
- $Id: BaseService.java,v 1.2 2002/03/13 19:43:35 mpoeschl Exp $
- Author:
- Kevin Burton, Rafal Krzewski
Field Summary |
protected org.apache.stratum.configuration.Configuration |
configuration
The configuration for this service |
protected java.lang.String |
name
The name of this Service. |
protected java.util.Properties |
properties
The properties of this service. |
protected ServiceBroker |
serviceBroker
A reference to the ServiceBroker that instantiated this object. |
Method Summary |
org.apache.stratum.configuration.Configuration |
getConfiguration()
Returns the configuration of this Service. |
java.lang.String |
getName()
Returns the name of this service. |
java.util.Properties |
getProperties()
Returns the properties of this Service. |
ServiceBroker |
getServiceBroker()
Returns a ServiceBroker reference. |
void |
setName(java.lang.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 java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
serviceBroker
protected ServiceBroker serviceBroker
- A reference to the ServiceBroker that instantiated this object.
properties
protected java.util.Properties properties
- The properties of this service.
configuration
protected org.apache.stratum.configuration.Configuration configuration
- The configuration for this service
name
protected java.lang.String name
- The name of this Service.
BaseService
public BaseService()
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 interface Service
- Parameters:
broker
- The ServiceBroker that instantiated this object.
setName
public void setName(java.lang.String name)
- ServiceBroker uses this method to pass a Service its name.
- Specified by:
setName
in interface Service
- Parameters:
name
- The name of this Service.
getName
public java.lang.String getName()
- Returns the name of this service.
- Specified by:
getName
in interface Service
- Returns:
- The name of this Service.
getServiceBroker
public ServiceBroker getServiceBroker()
- Returns a ServiceBroker reference.
- Returns:
- The ServiceBroker that instantiated this object.
getProperties
public java.util.Properties getProperties()
- Returns the properties of this Service.
- Specified by:
getProperties
in interface Service
- Returns:
- The Properties of this Service.
getConfiguration
public org.apache.stratum.configuration.Configuration getConfiguration()
- Returns the configuration of this Service.
- Specified by:
getConfiguration
in interface Service
- Returns:
- The Configuration of this Service.
Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.