org.apache.avalon.composition.model
Interface ServiceRepository

All Known Implementing Classes:
DefaultServiceRepository

public interface ServiceRepository

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

Version:
$Revision: 1.1.1.1 $ $Date: 2003/09/24 09:31:22 $
Author:
Avalon Development Team

Method Summary
 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.
 

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.

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.

Parameters:
reference - the reference descriptor
Returns:
the service matching the supplied descriptor.
Throws:
UnknownServiceException - if a matching service cannot be found
ServiceUnknownException


Copyright © Apache Software Foundation. All Rights Reserved.