org.apache.turbine.services
Class BaseService

java.lang.Object
  extended byorg.apache.turbine.services.BaseInitable
      extended byorg.apache.turbine.services.BaseService
All Implemented Interfaces:
Initable, Service
Direct Known Subclasses:
TurbineBaseService, TurbineCryptoService

public class BaseService
extends BaseInitable
implements Service

This class is a generic implementation of Service.

Version:
$Id: BaseService.java 534527 2007-05-02 16:10:59Z tv $
Author:
Kevin Burton, Rafal Krzewski, Henning P. Schmiedehausen

Field Summary
protected  org.apache.commons.configuration.Configuration configuration
          The configuration for this service
protected  java.lang.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
BaseService()
           
 
Method Summary
 org.apache.commons.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 org.apache.turbine.services.BaseInitable
getInit, getInitableBroker, init, init, setInit, setInitableBroker, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.turbine.services.Initable
getInit, init, init, setInitableBroker, shutdown
 

Field Detail

serviceBroker

protected ServiceBroker serviceBroker
A reference to the ServiceBroker that instantiated this object.


configuration

protected org.apache.commons.configuration.Configuration configuration
The configuration for this service


name

protected java.lang.String name
The name of 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 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.commons.configuration.Configuration getConfiguration()
Returns the configuration of this Service.

Specified by:
getConfiguration in interface Service
Returns:
The Configuration of this Service.


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.