@AutoStart(startOrder=1) @AutoInitialize(initOrder=1) public class IntegrationPlatform extends Object implements XPlatform
Constructor and Description |
---|
IntegrationPlatform() |
public void init(org.springframework.context.ApplicationContext context)
init
in interface Initializable
public void destroy()
destroy
in interface Initializable
public Future<ExecutionResult> receive(XIngressConnectorElement connector, XMessageContext messageContext, CompletableFuture<XMessageContext> flowCompletionFuture, ExchangePattern exchangePattern)
public Future<ExecutionResult> receiveResponse(XEgressConnectorElement connector, XMessageContext messageContext)
receiveResponse
in interface XPlatform
public ExecutionResult receiveResponseSync(XEgressConnectorElement connector, XMessageContext messageContext)
receiveResponseSync
in interface XPlatform
public CompletableFuture<ExecutionResult> processAsync(XMessageContext messageContext, XProcessingElement processingElement)
processAsync
in interface XPlatform
public ExecutionResult processSync(XMessageContext messageContext, XProcessingElement processingElement)
processSync
in interface XPlatform
public <T> CompletableFuture<T> executeCompletionAsync(CompletableFuture<T> completableFuture, BiConsumer<T,Throwable> action)
executeCompletionAsync
in interface XPlatform
public void setExecutorService(ExecutorService executorService)
public void setScheduledThreadPool(ScheduledThreadPoolExecutor scheduledThreadPool)
public <T> ScheduledFuture expireCompletableFutureAfter(CompletableFuture<T> completableFuture, long delayInMillis)
XPlatform
CompletableFuture
to be completed with a TimeoutException
after the given
delayexpireCompletableFutureAfter
in interface XPlatform
T
- return type of the CompletableFuture
completableFuture
- instance of CompletableFuture
to be altereddelayInMillis
- delay in milliseconds before expiringScheduledFuture
for the expiration taskpublic <T> ScheduledFuture expireCompletableFutureAfter(CompletableFuture<T> completableFuture, long delayInMillis, String timeoutMessage)
XPlatform
CompletableFuture
to be completed with a TimeoutException
after the given
delayexpireCompletableFutureAfter
in interface XPlatform
T
- return type of the CompletableFuture
completableFuture
- instance of CompletableFuture
to be altereddelayInMillis
- delay in milliseconds before expiringtimeoutMessage
- Message to be included for the resulting TimeoutException
ScheduledFuture
for the expiration taskpublic ScheduledFuture scheduleTimeoutForMessageContext(XMessageContext xMessageContext, long delayInMillis)
XPlatform
XMessageContext
as timed-out after the given time delayscheduleTimeoutForMessageContext
in interface XPlatform
xMessageContext
- XMessageContext
instance to be flagged as timed-outdelayInMillis
- time-out delay in millisecondsScheduledFuture
representing the scheduled task, or will return null
if the given delay is negativepublic long getGlobalResponseTimeout()
XPlatform
getGlobalResponseTimeout
in interface XPlatform
public long getGlobalEgressTimeout()
XPlatform
getGlobalEgressTimeout
in interface XPlatform
public Optional<XIntegrationFlowTracer> getIntegrationFlowTracer()
getIntegrationFlowTracer
in interface XPlatform
public boolean isMessageTracingEnabled()
isMessageTracingEnabled
in interface XPlatform
public void setGlobalResponseTimeout(long globalResponseTimeout)
public void setGlobalEgressTimeout(long globalEgressTimeout)
public void setIntegrationFlowTracer(XIntegrationFlowTracer integrationFlowTracer)
public void setFlowEventListeners(List<XFlowEventListener> flowEventListeners)
setFlowEventListeners
in interface XPlatform
public void addFlowEventListener(XFlowEventListener flowEventListener)
addFlowEventListener
in interface XPlatform
public void notifyFlowEvent(XFlowEventNotificationContext notificationContext, XFlowEventNotificationContext.XFlowEventType flowEventType, ExecutionResult executionResult)
notifyFlowEvent
in interface XPlatform
public XServerConfig getServerConfig()
getServerConfig
in interface XPlatform
Copyright © 2016–2019 AdroitLogic. All rights reserved.