Package org.apache.turbine.services
Interface TurbineServiceProvider
-
- All Known Subinterfaces:
AvalonComponentService
- All Known Implementing Classes:
TurbineYaafiComponentService
public interface TurbineServiceProvider
Interface for telling Turbine that the implementation class is an external service provider therefore can be used for looking up services not found by the Turbine implementation. It is assumed that the referenced service container handles the complete lifecycle of its services.- Author:
- Siegfried Goeschl
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
exists(String roleName)
Is the service known to the service container?Object
get(String roleName)
Returns an instance of the requested service.void
release(Object component)
Releases the instance you got before.
-
-
-
Method Detail
-
get
Object get(String roleName) throws InstantiationException
Returns an instance of the requested service. If the given service is not available/found we throw a RuntimeException since this is less intrusive.- Parameters:
roleName
- the name of the requested service- Returns:
- an instance of the service
- Throws:
InstantiationException
- the service could not be instantiated
-
release
void release(Object component)
Releases the instance you got before. This is only really required when not working with service singletons.- Parameters:
component
- the component to release
-
-