public class GatewayProxyFactoryBean extends AbstractEndpoint implements TrackableComponent, FactoryBean<Object>, MethodInterceptor, BeanClassLoaderAware
ConversionService set on the enclosing BeanFactory
under the name
IntegrationUtils.INTEGRATION_CONVERSION_SERVICE_BEAN_NAME
to
perform type conversions when necessary (thanks to Jon Schneider's contribution and suggestion in INT-1230).lifecycleCondition, lifecycleLockEXPRESSION_PARSER, loggerDEFAULT_PHASE| Constructor and Description |
|---|
GatewayProxyFactoryBean()
Create a Factory whose service interface type can be configured by setter injection.
|
GatewayProxyFactoryBean(Class<?> serviceInterface) |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
doInvoke(MethodInvocation invocation,
boolean runningOnCallerThread) |
protected void |
doStart()
Subclasses must implement this method with the start behavior.
|
protected void |
doStop()
Subclasses must implement this method with the stop behavior.
|
protected AsyncTaskExecutor |
getAsyncExecutor() |
Map<Method,MessagingGatewaySupport> |
getGateways()
Return the Map of
Method to MessagingGatewaySupport
generated by this factory bean. |
Object |
getObject() |
Class<?> |
getObjectType() |
Object |
invoke(MethodInvocation invocation) |
boolean |
isSingleton() |
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
void |
setAsyncExecutor(Executor executor)
Set the executor for use when the gateway method returns
Future or ListenableFuture. |
void |
setBeanClassLoader(ClassLoader beanClassLoader) |
void |
setDefaultReplyChannel(MessageChannel defaultReplyChannel)
Set the default reply channel.
|
void |
setDefaultReplyChannelName(String defaultReplyChannelName)
Set the default reply channel bean name.
|
void |
setDefaultReplyTimeout(Long defaultReplyTimeout)
Set the default timeout value for receiving reply messages.
|
void |
setDefaultReplyTimeoutExpression(Expression defaultReplyTimeout)
Set an expression to be evaluated to determine the default timeout value for
receiving reply messages.
|
void |
setDefaultReplyTimeoutExpressionString(String defaultReplyTimeout)
Set an expression to be evaluated to determine the default timeout value for
receiving reply messages.
|
void |
setDefaultRequestChannel(MessageChannel defaultRequestChannel)
Set the default request channel.
|
void |
setDefaultRequestChannelName(String defaultRequestChannelName)
Set the default request channel bean name.
|
void |
setDefaultRequestTimeout(Long defaultRequestTimeout)
Set the default timeout value for sending request messages.
|
void |
setDefaultRequestTimeoutExpression(Expression defaultRequestTimeout)
Set an expression to be evaluated to determine the default timeout value for
sending request messages.
|
void |
setDefaultRequestTimeoutExpressionString(String defaultRequestTimeout)
Set an expression to be evaluated to determine the default timeout value for
sending request messages.
|
void |
setErrorChannel(MessageChannel errorChannel)
Set the error channel.
|
void |
setErrorChannelName(String errorChannelName)
Set the error channel name.
|
void |
setGlobalMethodMetadata(GatewayMethodMetadata globalMethodMetadata) |
void |
setMapper(MethodArgsMessageMapper mapper)
|
void |
setMethodMetadataMap(Map<String,GatewayMethodMetadata> methodMetadataMap) |
void |
setServiceInterface(Class<?> serviceInterface)
Set the interface class that the generated proxy should implement.
|
void |
setShouldTrack(boolean shouldTrack) |
void |
setTypeConverter(TypeConverter typeConverter) |
destroy, doStop, getPhase, getRole, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stopafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getComponentType, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBeanName, getComponentName, getComponentTypepublic GatewayProxyFactoryBean()
RequestReplyExchanger, upon initialization.public GatewayProxyFactoryBean(Class<?> serviceInterface)
public void setServiceInterface(Class<?> serviceInterface)
RequestReplyExchanger.serviceInterface - The service interface.public void setDefaultRequestChannel(MessageChannel defaultRequestChannel)
defaultRequestChannel - the channel to which request messages will
be sent if no request channel has been configured with an annotation.public void setDefaultRequestChannelName(String defaultRequestChannelName)
defaultRequestChannelName - the channel name to which request messages will
be sent if no request channel has been configured with an annotation.public void setDefaultReplyChannel(MessageChannel defaultReplyChannel)
defaultReplyChannel - the channel from which reply messages will be
received if no reply channel has been configured with an annotationpublic void setDefaultReplyChannelName(String defaultReplyChannelName)
defaultReplyChannelName - the channel name from which reply messages will be
received if no reply channel has been configured with an annotationpublic void setErrorChannel(MessageChannel errorChannel)
errorChannel - The error channel.public void setErrorChannelName(String errorChannelName)
errorChannelName - The error channel bean name.public void setDefaultRequestTimeout(Long defaultRequestTimeout)
defaultRequestTimeout - the timeout value in millisecondspublic void setDefaultRequestTimeoutExpression(Expression defaultRequestTimeout)
defaultRequestTimeout - the timeout value in millisecondspublic void setDefaultRequestTimeoutExpressionString(String defaultRequestTimeout)
defaultRequestTimeout - the timeout value in millisecondspublic void setDefaultReplyTimeout(Long defaultReplyTimeout)
defaultReplyTimeout - the timeout value in millisecondspublic void setDefaultReplyTimeoutExpression(Expression defaultReplyTimeout)
defaultReplyTimeout - the timeout value in millisecondspublic void setDefaultReplyTimeoutExpressionString(String defaultReplyTimeout)
defaultReplyTimeout - the timeout value in millisecondspublic void setShouldTrack(boolean shouldTrack)
setShouldTrack in interface TrackableComponentpublic void setAsyncExecutor(@Nullable Executor executor)
Future or ListenableFuture.
Set it to null to disable the async processing, and any
Future return types must be returned by the downstream flow.executor - The executor.public void setTypeConverter(TypeConverter typeConverter)
public void setMethodMetadataMap(Map<String,GatewayMethodMetadata> methodMetadataMap)
public void setGlobalMethodMetadata(GatewayMethodMetadata globalMethodMetadata)
public void setBeanClassLoader(ClassLoader beanClassLoader)
setBeanClassLoader in interface BeanClassLoaderAwarepublic final void setMapper(MethodArgsMessageMapper mapper)
mapper - the mapper.protected AsyncTaskExecutor getAsyncExecutor()
public Map<Method,MessagingGatewaySupport> getGateways()
Method to MessagingGatewaySupport
generated by this factory bean.protected void onInit()
IntegrationObjectSupportonInit in class AbstractEndpointpublic Class<?> getObjectType()
getObjectType in interface FactoryBean<Object>public Object getObject()
getObject in interface FactoryBean<Object>public boolean isSingleton()
isSingleton in interface FactoryBean<Object>@Nullable public Object invoke(MethodInvocation invocation) throws Throwable
invoke in interface MethodInterceptorThrowable@Nullable protected Object doInvoke(MethodInvocation invocation, boolean runningOnCallerThread) throws Throwable
Throwableprotected void doStart()
AbstractEndpointAbstractEndpoint.lifecycleLock.doStart in class AbstractEndpointprotected void doStop()
AbstractEndpointAbstractEndpoint.lifecycleLock.doStop in class AbstractEndpoint