org.apache.fulcrum.spring
Class AvalonServiceFactoryBean

java.lang.Object
  extended by org.apache.fulcrum.spring.AvalonServiceFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean

public class AvalonServiceFactoryBean
extends Object
implements org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean

A Spring factory bean to lookup Avalon service and get a hold on them as Spring bean. Such spring bean can than be injected as dependency into other beans.

Author:
Siegfried Goeschl

Constructor Summary
AvalonServiceFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
          Resolve the service name to a service.
 Object getObject()
           
 Class getObjectType()
           
 boolean isSingleton()
           
 void setServiceManager(org.apache.avalon.framework.service.ServiceManager serviceManager)
          Set the Avalon ServiceManager to lookup the Avalon service.
 void setServiceName(String serviceName)
          Set the name of the Avalon service to be resolved by this Spring bean factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AvalonServiceFactoryBean

public AvalonServiceFactoryBean()
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Resolve the service name to a service.

Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception
See Also:
InitializingBean.afterPropertiesSet()

setServiceManager

public void setServiceManager(org.apache.avalon.framework.service.ServiceManager serviceManager)
Set the Avalon ServiceManager to lookup the Avalon service.

Parameters:
serviceManager - the Avalon ServiceManager

setServiceName

public void setServiceName(String serviceName)
Set the name of the Avalon service to be resolved by this Spring bean factory.

Parameters:
serviceName - the Avalon service name

getObject

public Object getObject()
                 throws Exception
Specified by:
getObject in interface org.springframework.beans.factory.FactoryBean
Throws:
Exception
See Also:
FactoryBean.getObject()

getObjectType

public Class getObjectType()
Specified by:
getObjectType in interface org.springframework.beans.factory.FactoryBean
See Also:
FactoryBean.getObjectType()

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface org.springframework.beans.factory.FactoryBean
See Also:
FactoryBean.isSingleton()


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