org.apache.turbine.services
Interface Service

All Superinterfaces:
Initable
All Known Subinterfaces:
AssemblerBrokerService, AvalonComponentService, CryptoService, FactoryService, GlobalCacheService, JsonRpcService, JspService, LocalizationService, MimeTypeService, NamingService, PoolService, PullService, RunDataService, ScheduleService, SecurityService, ServletService, SessionService, TemplateService, UIService, UniqueIdService, UploadService, VelocityService, XmlRpcService, XSLTService
All Known Implementing Classes:
ACSYaafiComponentService, BaseSecurityService, BaseService, BaseUnicastRemoteService, BaseUploadService, TurbineAssemblerBrokerService, TurbineAvalonComponentService, TurbineCryptoService, TurbineFactoryService, TurbineGlobalCacheService, TurbineJsonRpcService, TurbineJspService, TurbineLocalizationService, TurbineMimeTypeService, TurbineNamingService, TurbinePoolService, TurbinePullService, TurbineRunDataService, TurbineSchedulerService, TurbineServletService, TurbineSessionService, TurbineTemplateService, TurbineUIService, TurbineUniqueIdService, TurbineUploadService, TurbineVelocityService, TurbineXmlRpcService, TurbineXSLTService

public interface Service
extends Initable

Services are Initables that have a name, and a set of properties.

Version:
$Id: Service.java 534527 2007-05-02 16:10:59Z tv $
Author:
Greg Ritter, Brett McLaughlin, Kevin Burton, Rafal Krzewski, Daniel Rall

Field Summary
static java.lang.String SERVICE_NAME
          The name of this service.
 
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.
 void setName(java.lang.String name)
          ServiceBroker uses this method to pass a Service its name.
 void setServiceBroker(ServiceBroker broker)
          Provides a Service with a reference to the ServiceBroker that instantiated this object, so that it can ask for its properties and access other Services.
 
Methods inherited from interface org.apache.turbine.services.Initable
getInit, init, init, setInitableBroker, shutdown
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
The name of this service.

See Also:
Constant Field Values
Method Detail

setServiceBroker

public void setServiceBroker(ServiceBroker broker)
Provides a Service with a reference to the ServiceBroker that instantiated this object, so that it can ask for its properties and access other Services.

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. Service uses its name to ask the broker for an apropriate set of Properties.

Parameters:
name - The name of this Service.

getName

public java.lang.String getName()
Returns the name of this Service.

Returns:
The name of this Service.

getProperties

public java.util.Properties getProperties()
Returns the Properties of this Service. Every Service has at least one property, which is "classname", containing the name of the class implementing this service. Note that the service may chose to alter its properties, therefore they may be different from those returned by ServiceBroker.

Returns:
The properties of this Service.

getConfiguration

public org.apache.commons.configuration.Configuration getConfiguration()
Returns the Configuration of this Service. Every Service has at least one property, which is "classname", containing the name of the class implementing this service. Note that the service may chose to alter its configuration, therefore they may be different from those returned by ServiceBroker.

Returns:
The Configuration of this Service.


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