Class TurbineNamingService
- java.lang.Object
-
- org.apache.turbine.services.BaseInitable
-
- org.apache.turbine.services.BaseService
-
- org.apache.turbine.services.TurbineBaseService
-
- org.apache.turbine.services.naming.TurbineNamingService
-
- All Implemented Interfaces:
Initable,NamingService,Service
public class TurbineNamingService extends TurbineBaseService implements NamingService
This class is the default implementation of NamingService, which provides JNDI naming contexts.- Version:
- $Id$
- Author:
- Greg Ritter, Colin Chalmers, Henning P. Schmiedehausen, Peter Courcoux
-
-
Field Summary
-
Fields inherited from class org.apache.turbine.services.BaseService
configuration, name, serviceBroker
-
Fields inherited from class org.apache.turbine.services.BaseInitable
initableBroker, isInitialized
-
Fields inherited from interface org.apache.turbine.services.naming.NamingService
SERVICE_NAME
-
Fields inherited from interface org.apache.turbine.services.Service
SERVICE_NAME
-
-
Constructor Summary
Constructors Constructor Description TurbineNamingService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContextgetContext(String contextName)Return the Context with the specified name.voidinit()Called the first time the Service is used.-
Methods inherited from class org.apache.turbine.services.TurbineBaseService
init, init, shutdown
-
Methods inherited from class org.apache.turbine.services.BaseService
getConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBroker
-
Methods inherited from class org.apache.turbine.services.BaseInitable
getInit, getInitableBroker, setInit, setInitableBroker
-
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, setInitableBroker, shutdown
-
Methods inherited from interface org.apache.turbine.services.Service
getConfiguration, getName, getProperties, setName, setServiceBroker
-
-
-
-
Constructor Detail
-
TurbineNamingService
public TurbineNamingService()
-
-
Method Detail
-
init
public void init() throws InitializationException
Called the first time the Service is used.- Specified by:
initin interfaceInitable- Overrides:
initin classTurbineBaseService- Throws:
InitializationException- if initialization of this class was not successful.
-
getContext
public Context getContext(String contextName)
Return the Context with the specified name. The Context is constructed using the properties for the context with the specified name; ie. those properties that start with "services.servicename.properties.name.".- Specified by:
getContextin interfaceNamingService- Parameters:
contextName- The name of the context.- Returns:
- The context with the specified name, or null if no context exists with that name.
-
-