public class ServiceAsSpringBean<T> extends Object implements org.springframework.beans.factory.FactoryBean<T>, org.springframework.beans.factory.InitializingBean
ServiceRegistry as Spring beans.
I.e. the service will be looked up in the given serviceRegistry made available for injection into other Spring-managed beans.
<bean id="myServiceFromTheRegistry" class="net.sf.jstuff.integration.serviceregistry.support.ServiceAsSpringBean">
<property name="serviceRegistry" ref="mySpringManagedServiceRegistry" />
<!-- if serviceEndpointId is not specified the fully qualified class name of the interface will be used -->
<property name="serviceEndpointId" value="com.example.MyService" />
<property name="serviceInterface" value="com.example.MyService" />
</bean>
| Constructor and Description |
|---|
ServiceAsSpringBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
T |
getObject() |
Class<T> |
getObjectType() |
boolean |
isSingleton() |
void |
setServiceEndpointId(String serviceEndpointId) |
void |
setServiceInterface(Class<T> serviceInterface) |
void |
setServiceRegistry(ServiceRegistry serviceRegistry) |
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic Class<T> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<T>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<T>public void setServiceEndpointId(String serviceEndpointId)
public void setServiceRegistry(ServiceRegistry serviceRegistry)
Copyright © 2010–2021 Vegard IT GmbH, Germany. All rights reserved.