org.springframework.integration.gateway
Class GatewayProxyFactoryBean

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.endpoint.AbstractEndpoint
          extended by org.springframework.integration.gateway.GatewayProxyFactoryBean
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle

public class GatewayProxyFactoryBean
extends AbstractEndpoint
implements org.springframework.beans.factory.FactoryBean, org.aopalliance.intercept.MethodInterceptor, org.springframework.beans.factory.BeanClassLoaderAware

Generates a proxy for the provided service interface to enable interaction with messaging components without application code being aware of them.

Author:
Mark Fisher

Field Summary
 
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
logger
 
Constructor Summary
GatewayProxyFactoryBean()
           
 
Method Summary
protected  void doStart()
          Subclasses must implement this method with the start behavior.
protected  void doStop()
          Subclasses must implement this method with the stop behavior.
 java.lang.Object getObject()
           
 java.lang.Class<?> getObjectType()
           
 java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
           
 boolean isSingleton()
           
protected  void onInit()
           
 void setBeanClassLoader(java.lang.ClassLoader beanClassLoader)
           
 void setDefaultReplyChannel(MessageChannel defaultReplyChannel)
          Set the default reply channel.
 void setDefaultReplyTimeout(long defaultReplyTimeout)
          Set the default timeout value for receiving reply messages.
 void setDefaultRequestChannel(MessageChannel defaultRequestChannel)
          Set the default request channel.
 void setDefaultRequestTimeout(long defaultRequestTimeout)
          Set the default timeout value for sending request messages.
 void setServiceInterface(java.lang.Class<?> serviceInterface)
           
 void setTypeConverter(org.springframework.beans.TypeConverter typeConverter)
           
 
Methods inherited from class org.springframework.integration.endpoint.AbstractEndpoint
afterPropertiesSet, isRunning, setAutoStartup, setTaskScheduler, start, stop
 
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
getBeanFactory, getBeanName, getChannelResolver, getTaskScheduler, setBeanFactory, setBeanName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GatewayProxyFactoryBean

public GatewayProxyFactoryBean()
Method Detail

setServiceInterface

public void setServiceInterface(java.lang.Class<?> serviceInterface)

setDefaultRequestChannel

public void setDefaultRequestChannel(MessageChannel defaultRequestChannel)
Set the default request channel.

Parameters:
defaulRequestChannel - the channel to which request messages will be sent if no request channel has been configured with an annotation

setDefaultReplyChannel

public void setDefaultReplyChannel(MessageChannel defaultReplyChannel)
Set the default reply channel. If no default reply channel is provided, and no reply channel is configured with annotations, an anonymous, temporary channel will be used for handling replies.

Parameters:
replyChannel - the channel from which reply messages will be received if no reply channel has been configured with an annotation

setDefaultRequestTimeout

public void setDefaultRequestTimeout(long defaultRequestTimeout)
Set the default timeout value for sending request messages. If not explicitly configured with an annotation, this value will be used.

Parameters:
defaultRequestTimeout - the timeout value in milliseconds

setDefaultReplyTimeout

public void setDefaultReplyTimeout(long defaultReplyTimeout)
Set the default timeout value for receiving reply messages. If not explicitly configured with an annotation, this value will be used.

Parameters:
defaultReplyTimeout - the timeout value in milliseconds

setTypeConverter

public void setTypeConverter(org.springframework.beans.TypeConverter typeConverter)

setBeanClassLoader

public void setBeanClassLoader(java.lang.ClassLoader beanClassLoader)
Specified by:
setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAware

onInit

protected void onInit()
               throws java.lang.Exception
Overrides:
onInit in class AbstractEndpoint
Throws:
java.lang.Exception

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

invoke

public java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
                        throws java.lang.Throwable
Specified by:
invoke in interface org.aopalliance.intercept.MethodInterceptor
Throws:
java.lang.Throwable

doStart

protected void doStart()
Description copied from class: AbstractEndpoint
Subclasses must implement this method with the start behavior. This method will be invoked while holding the AbstractEndpoint.lifecycleLock.

Specified by:
doStart in class AbstractEndpoint

doStop

protected void doStop()
Description copied from class: AbstractEndpoint
Subclasses must implement this method with the stop behavior. This method will be invoked while holding the AbstractEndpoint.lifecycleLock.

Specified by:
doStop in class AbstractEndpoint