Search in sources :

Example 1 with ReactiveAroundInterceptorAdapter

use of org.mule.runtime.core.internal.processor.interceptor.ReactiveAroundInterceptorAdapter in project mule by mulesoft.

the class AbstractMessageProcessorChain method initialise.

@Override
public void initialise() throws InitialisationException {
    processorInterceptorManager.getInterceptorFactories().stream().forEach(interceptorFactory -> {
        ReactiveInterceptorAdapter reactiveInterceptorAdapter = new ReactiveInterceptorAdapter(interceptorFactory);
        try {
            muleContext.getInjector().inject(reactiveInterceptorAdapter);
        } catch (MuleException e) {
            throw new MuleRuntimeException(e);
        }
        additionalInterceptors.add(0, reactiveInterceptorAdapter);
    });
    processorInterceptorManager.getInterceptorFactories().stream().forEach(interceptorFactory -> {
        ReactiveAroundInterceptorAdapter reactiveInterceptorAdapter = new ReactiveAroundInterceptorAdapter(interceptorFactory);
        try {
            muleContext.getInjector().inject(reactiveInterceptorAdapter);
        } catch (MuleException e) {
            throw new MuleRuntimeException(e);
        }
        additionalInterceptors.add(0, reactiveInterceptorAdapter);
    });
    initialiseIfNeeded(getMessageProcessorsForLifecycle(), muleContext);
}
Also used : MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) ReactiveInterceptorAdapter(org.mule.runtime.core.internal.processor.interceptor.ReactiveInterceptorAdapter) ReactiveAroundInterceptorAdapter(org.mule.runtime.core.internal.processor.interceptor.ReactiveAroundInterceptorAdapter) MuleException(org.mule.runtime.api.exception.MuleException)

Aggregations

MuleException (org.mule.runtime.api.exception.MuleException)1 MuleRuntimeException (org.mule.runtime.api.exception.MuleRuntimeException)1 ReactiveAroundInterceptorAdapter (org.mule.runtime.core.internal.processor.interceptor.ReactiveAroundInterceptorAdapter)1 ReactiveInterceptorAdapter (org.mule.runtime.core.internal.processor.interceptor.ReactiveInterceptorAdapter)1