T - The type of gateway to be created by this factory bean. Note that the correct interface must also be set
using setGatewayInterface(Class). Failure to do so may result in class cast execptions.public class CommandGatewayFactoryBean<T> extends Object implements org.springframework.beans.factory.FactoryBean<T>, org.springframework.beans.factory.InitializingBean
CommandGateway interface is assumed.
For details about the structure of compatible interfaces, see GatewayProxyFactory.GatewayProxyFactory| Constructor and Description |
|---|
CommandGatewayFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
T |
getObject() |
Class<?> |
getObjectType() |
boolean |
isSingleton() |
void |
setCommandBus(CommandBus commandBus)
Sets the command bus on which the Gateway must dispatch commands.
|
void |
setCommandDispatchInterceptors(CommandDispatchInterceptor... commandDispatchInterceptors)
Sets the interceptors that should be invoked before a command is dispatched the the Command Bus.
|
void |
setCommandDispatchInterceptors(List<CommandDispatchInterceptor> commandDispatchInterceptors)
Sets the interceptors that should be invoked before a command is dispatched the the Command Bus.
|
void |
setGatewayInterface(Class<T> gatewayInterface)
Sets the interface that describes the gateway instance to describe.
|
void |
setRetryScheduler(RetryScheduler retryScheduler)
Sets the RetryScheduler that will be invoked when a command fails execution.
|
public Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<T>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<T>public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic void setCommandBus(CommandBus commandBus)
commandBus - the command bus on which the Gateway must dispatch commandspublic void setRetryScheduler(RetryScheduler retryScheduler)
retryScheduler - the RetryScheduler that will be invoked when a command fails executionpublic void setGatewayInterface(Class<T> gatewayInterface)
CommandGateway.gatewayInterface - The interface describing the gatewayIllegalArgumentException - if the given gatewayInterface is null or not an
interface.public void setCommandDispatchInterceptors(CommandDispatchInterceptor... commandDispatchInterceptors)
commandDispatchInterceptors - the interceptors that should be invoked before a command is dispatched the
the
Command Buspublic void setCommandDispatchInterceptors(List<CommandDispatchInterceptor> commandDispatchInterceptors)
commandDispatchInterceptors - the interceptors that should be invoked before a command is dispatched the
the
Command BusCopyright © 2010-2014. All Rights Reserved.