public class GatewayProxyFactoryBean extends AbstractEndpoint implements TrackableComponent, FactoryBean<Object>, org.aopalliance.intercept.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, lifecycleLocklogger| 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(org.aopalliance.intercept.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() |
Object |
getObject() |
Class<?> |
getObjectType() |
Object |
invoke(org.aopalliance.intercept.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 |
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 |
setErrorChannel(MessageChannel errorChannel)
Set the error channel.
|
void |
setGlobalMethodMetadata(GatewayMethodMetadata globalMethodMetadata) |
void |
setMapper(MethodArgsMessageMapper mapper)
|
void |
setMethodMetadataMap(Map<String,GatewayMethodMetadata> methodMetadataMap) |
void |
setReactorEnvironment(Object reactorEnvironment)
Set the Reactor
Environment to be used for processing methods with a
Promise return type. |
void |
setServiceInterface(Class<?> serviceInterface)
Set the interface class that the generated proxy should implement.
|
void |
setShouldTrack(boolean shouldTrack) |
void |
setTypeConverter(TypeConverter typeConverter) |
doStop, getPhase, isAutoStartup, isRunning, setAutoStartup, setPhase, setTaskScheduler, start, stop, stopafterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getComponentType, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetComponentName, 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 setDefaultReplyChannel(MessageChannel defaultReplyChannel)
defaultReplyChannel - the channel 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 setDefaultRequestTimeout(Long defaultRequestTimeout)
defaultRequestTimeout - the timeout value in millisecondspublic void setDefaultReplyTimeout(Long defaultReplyTimeout)
defaultReplyTimeout - the timeout value in millisecondspublic void setShouldTrack(boolean shouldTrack)
setShouldTrack in interface TrackableComponentpublic void setAsyncExecutor(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 setReactorEnvironment(Object reactorEnvironment)
Environment to be used for processing methods with a
Promise return type. (Required when any such methods are declared on the
service interface).reactorEnvironment - the Reactor Environment.public void setBeanClassLoader(ClassLoader beanClassLoader)
setBeanClassLoader in interface BeanClassLoaderAwarepublic final void setMapper(MethodArgsMessageMapper mapper)
mapper - the mapper.protected AsyncTaskExecutor getAsyncExecutor()
protected void onInit()
IntegrationObjectSupportonInit in class IntegrationObjectSupportpublic Class<?> getObjectType()
getObjectType in interface FactoryBean<Object>public Object getObject() throws Exception
getObject in interface FactoryBean<Object>Exceptionpublic boolean isSingleton()
isSingleton in interface FactoryBean<Object>public Object invoke(org.aopalliance.intercept.MethodInvocation invocation) throws Throwable
invoke in interface org.aopalliance.intercept.MethodInterceptorThrowableprotected Object doInvoke(org.aopalliance.intercept.MethodInvocation invocation, boolean runningOnCallerThread) throws Throwable
Throwableprotected void doStart()
AbstractEndpointAbstractEndpoint.lifecycleLock.doStart in class AbstractEndpointprotected void doStop()
AbstractEndpointAbstractEndpoint.lifecycleLock.doStop in class AbstractEndpoint