org.codehaus.enunciate.modules.spring_app
Class ServiceEndpointFactoryBean

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.codehaus.enunciate.modules.spring_app.ServiceEndpointFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean, org.springframework.context.ApplicationContextAware

public class ServiceEndpointFactoryBean
extends org.springframework.context.support.ApplicationObjectSupport
implements org.springframework.beans.factory.FactoryBean

Factory bean for creating service bean instances.

Author:
Ryan Heaton

Field Summary
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Constructor Summary
ServiceEndpointFactoryBean(java.lang.Class serviceInterface)
           
 
Method Summary
protected  void addInterceptor(java.lang.Object interceptor)
          Adds an interceptor to this list in order.
 java.lang.String getDefaultImplementationBeanName()
          The bean name to use to look up the implementation bean if it hasn't been explicitly set.
 java.lang.Class getDefaultImplementationClass()
          The class to use if no other implementations are provided.
 java.lang.Object getObject()
           
 java.lang.Class getObjectType()
           
 java.lang.Object getServiceImplementationBean()
          The implementation bean.
 java.lang.Class getServiceInterface()
          The service interface.
protected  void initApplicationContext(org.springframework.context.ApplicationContext context)
           
 boolean isSingleton()
           
 void setDefaultImplementationBeanName(java.lang.String defaultImplementationBeanName)
          The bean name to use to look up the implementation bean if it hasn't been explicitly set.
 void setDefaultImplementationClass(java.lang.Class defaultImplementationClass)
          The class to use if no other implementations are provided.
 void setInterceptors(java.util.List<java.lang.Object> interceptors)
          Ordered list of interceptors to inject on all service beans.
 void setServiceImplementationBean(java.lang.Object serviceImplementationBean)
          The implementation bean.
 java.lang.Object wrapEndpoint(java.lang.Class iface, java.lang.Object endpointImpl)
          Wraps a specific endpoint bean with the necessary interceptors.
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, isContextRequired, requiredContextClass, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceEndpointFactoryBean

public ServiceEndpointFactoryBean(java.lang.Class serviceInterface)
Method Detail

initApplicationContext

protected void initApplicationContext(org.springframework.context.ApplicationContext context)
                               throws org.springframework.beans.BeansException
Overrides:
initApplicationContext in class org.springframework.context.support.ApplicationObjectSupport
Throws:
org.springframework.beans.BeansException

setInterceptors

public void setInterceptors(java.util.List<java.lang.Object> interceptors)
Ordered list of interceptors to inject on all service beans.

Parameters:
interceptors - The list of interceptors.

addInterceptor

protected void addInterceptor(java.lang.Object interceptor)
Adds an interceptor to this list in order.

Parameters:
interceptor - The interceptor to add to the list in order.

getObject

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

getObjectType

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

isSingleton

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

wrapEndpoint

public java.lang.Object wrapEndpoint(java.lang.Class iface,
                                     java.lang.Object endpointImpl)
                              throws java.lang.Exception
Wraps a specific endpoint bean with the necessary interceptors.

Parameters:
iface - The interface.
endpointImpl - The implementation.
Returns:
The wrapped endpoint.
Throws:
java.lang.Exception

getServiceInterface

public java.lang.Class getServiceInterface()
The service interface.

Returns:
The service interface.

getServiceImplementationBean

public java.lang.Object getServiceImplementationBean()
The implementation bean.

Returns:
The implementation bean.

setServiceImplementationBean

public void setServiceImplementationBean(java.lang.Object serviceImplementationBean)
The implementation bean.

Parameters:
serviceImplementationBean - The implementation bean.

getDefaultImplementationBeanName

public java.lang.String getDefaultImplementationBeanName()
The bean name to use to look up the implementation bean if it hasn't been explicitly set.

Returns:
The bean name to use to look up the implementation bean if it hasn't been explicitly set.

setDefaultImplementationBeanName

public void setDefaultImplementationBeanName(java.lang.String defaultImplementationBeanName)
The bean name to use to look up the implementation bean if it hasn't been explicitly set.

Parameters:
defaultImplementationBeanName - The bean name to use to look up the implementation bean if it hasn't been explicitly set.

getDefaultImplementationClass

public java.lang.Class getDefaultImplementationClass()
The class to use if no other implementations are provided.

Returns:
The class to use if no other implementations are provided.

setDefaultImplementationClass

public void setDefaultImplementationClass(java.lang.Class defaultImplementationClass)
The class to use if no other implementations are provided.

Parameters:
defaultImplementationClass - The class to use if no other implementations are provided.