org.springframework.integration.bus
Class DefaultChannelFactoryBean

java.lang.Object
  extended by org.springframework.integration.bus.DefaultChannelFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean, org.springframework.context.ApplicationContextAware

public class DefaultChannelFactoryBean
extends java.lang.Object
implements org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.FactoryBean

Creates a channel by delegating to the current message bus' configured ChannelFactory. Tries to retrieve the ChannelFactory from the single MessageBus defined in the ApplicationContext. As a FactoryBean, this class is solely intended to be used within an ApplicationContext.

Author:
Marius Bogoevici

Field Summary
private  ChannelFactory channelFactory
           
private  DispatcherPolicy dispatcherPolicy
           
private  java.util.List<ChannelInterceptor> interceptors
           
 
Constructor Summary
DefaultChannelFactoryBean(DispatcherPolicy dispatcherPolicy)
           
 
Method Summary
 java.lang.Object getObject()
           
 java.lang.Class<?> getObjectType()
           
 boolean isSingleton()
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setInterceptors(java.util.List<ChannelInterceptor> interceptors)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

channelFactory

private volatile ChannelFactory channelFactory

interceptors

private volatile java.util.List<ChannelInterceptor> interceptors

dispatcherPolicy

private volatile DispatcherPolicy dispatcherPolicy
Constructor Detail

DefaultChannelFactoryBean

public DefaultChannelFactoryBean(DispatcherPolicy dispatcherPolicy)
Method Detail

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware

setInterceptors

public void setInterceptors(java.util.List<ChannelInterceptor> interceptors)

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