public class DefaultProcessorInterceptorManager extends Object implements ProcessorInterceptorProvider, org.mule.runtime.api.lifecycle.Initialisable
| Constructor and Description |
|---|
DefaultProcessorInterceptorManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addInterceptorFactory(org.mule.runtime.api.interception.ProcessorInterceptorFactory interceptorFactory)
Adds an
ProcessorInterceptorFactory to be applied to the components of a flow. |
List<org.mule.runtime.api.interception.ProcessorInterceptorFactory> |
getInterceptorFactories()
Provides the
ProcessorInterceptorFactories that were registered by calling
ProcessorInterceptorProvider.addInterceptorFactory(ProcessorInterceptorFactory), in the order defined by ProcessorInterceptorProvider.setInterceptorsOrder(String...)
if defined. |
void |
initialise() |
void |
setInterceptorsOrder(String... packagesOrder)
Determines the order in which the
ProcessorInterceptorFactories products will be applied
to the applicable components. |
public void setInterceptorsOrder(String... packagesOrder)
ProcessorInterceptorProviderProcessorInterceptorFactories products will be applied
to the applicable components.
For each factory, its fully qualified class name will be obtained and matched against the
passed packagesOrder to sort the factories. In the case there is more than one factory with a package name prefix, the order in which they were added will be kept.
Assuming this is called with parameters ("org.package", "com.plugin"), and the following
factories have been added through
ProcessorInterceptorProvider.addInterceptorFactory(ProcessorInterceptorFactory) (in this order):
com.plugin.SomeInterceptororg.mule.MuleInterceptororg.package.logging.LoggerInterceptorcom.plugin.SomeOtherInterceptororg.mule.OtherMuleInterceptorfactories will be sorted, when obtained through ProcessorInterceptorProvider.getInterceptorFactories()
like this:
org.package.logging.LoggerInterceptorcom.plugin.SomeInterceptorcom.plugin.SomeOtherInterceptororg.mule.MuleInterceptororg.mule.OtherMuleInterceptorsetInterceptorsOrder in interface ProcessorInterceptorProviderpackagesOrder - the wanted order for the interceptors.public void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionpublic void addInterceptorFactory(org.mule.runtime.api.interception.ProcessorInterceptorFactory interceptorFactory)
ProcessorInterceptorProviderProcessorInterceptorFactory to be applied to the components of a flow.
By default, the created ProcessorInterceptors will be applied in the same order as they were added by calling this
method. To change this default ordering, ProcessorInterceptorProvider.setInterceptorsOrder(String...) must be called with the desired order.
addInterceptorFactory in interface ProcessorInterceptorProviderinterceptorFactory - the factory of ProcessorInterceptors to add.public List<org.mule.runtime.api.interception.ProcessorInterceptorFactory> getInterceptorFactories()
ProcessorInterceptorProviderProcessorInterceptorFactories that were registered by calling
ProcessorInterceptorProvider.addInterceptorFactory(ProcessorInterceptorFactory), in the order defined by ProcessorInterceptorProvider.setInterceptorsOrder(String...)
if defined.getInterceptorFactories in interface ProcessorInterceptorProviderProcessorInterceptorFactories that will yield the
ProcessorInterceptors to be applied on each component of a flow.Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.