org.apache.avalon.composition.model.impl
Class DefaultServiceRepository

java.lang.Object
  extended byorg.apache.avalon.composition.model.impl.DefaultServiceRepository
All Implemented Interfaces:
ServiceRepository

public class DefaultServiceRepository
extends Object
implements ServiceRepository

A service repository provides support for the retrival of service defintions.

Version:
$Revision: 1.2 $ $Date: 2003/10/28 20:21:00 $
Author:
Avalon Development Team

Method Summary
protected  Logger getLogger()
           
 Service getService(ReferenceDescriptor reference)
          Locate a Service instances associated with the supplied referecne descriptor.
 Service getService(String classname, Version version)
          Locate a Service instances associated with the supplied classname and version.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getService

public Service getService(String classname,
                          Version version)
                   throws ServiceUnknownException
Locate a Service instances associated with the supplied classname and version. If a service defintion is not found locally, the implementation redirects the request to the parent service manager.

Specified by:
getService in interface ServiceRepository
Parameters:
classname - the service class name
version - the service version
Returns:
the service matching the supplied classname and version.
Throws:
UnknownServiceException - if a matching service cannot be found
ServiceUnknownException

getService

public Service getService(ReferenceDescriptor reference)
                   throws ServiceUnknownException
Locate a Service instances associated with the supplied referecne descriptor. If a service defintion is not found locally, the implementation redirects the request to the parent service manager.

Specified by:
getService in interface ServiceRepository
Parameters:
reference - the reference descriptor
Returns:
the service matching the supplied descriptor.
Throws:
UnknownServiceException - if a matching service cannot be found
ServiceUnknownException

getLogger

protected Logger getLogger()


Copyright © Apache Software Foundation. All Rights Reserved.