org.apache.fulcrum.spring
Class BeanFactoryServiceManager

java.lang.Object
  extended by org.apache.fulcrum.spring.BeanFactoryServiceManager
All Implemented Interfaces:
org.apache.avalon.framework.service.ServiceManager

public class BeanFactoryServiceManager
extends Object
implements org.apache.avalon.framework.service.ServiceManager

Wraps a Spring bean factory to implement an Avalon service lookup - this allows to delegate a service lookup to Spring.

Author:
Siegfried Goeschl

Constructor Summary
BeanFactoryServiceManager(org.springframework.beans.factory.BeanFactory beanFactory)
          Constructor
 
Method Summary
 boolean hasService(String key)
           
 Object lookup(String key)
           
 void release(Object o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanFactoryServiceManager

public BeanFactoryServiceManager(org.springframework.beans.factory.BeanFactory beanFactory)
Constructor

Parameters:
beanFactory - Spring's bean factory
Method Detail

lookup

public Object lookup(String key)
              throws org.apache.avalon.framework.service.ServiceException
Specified by:
lookup in interface org.apache.avalon.framework.service.ServiceManager
Throws:
org.apache.avalon.framework.service.ServiceException
See Also:
ServiceManager.lookup(String)

hasService

public boolean hasService(String key)
Specified by:
hasService in interface org.apache.avalon.framework.service.ServiceManager
See Also:
ServiceManager.hasService(String)

release

public void release(Object o)
Specified by:
release in interface org.apache.avalon.framework.service.ServiceManager
See Also:
ServiceManager.release(Object)


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.