public interface SourceInterceptorFactory extends Supplier<SourceInterceptor>
SourceInterceptor instances.
Implementations may have fields annotated with @Inject, which will be resolved before attempting to
call Supplier.get().
| Modifier and Type | Interface and Description |
|---|---|
static interface |
SourceInterceptorFactory.SourceInterceptorOrder |
| Modifier and Type | Field and Description |
|---|---|
static String |
SOURCE_INTERCEPTORS_ORDER_REGISTRY_KEY
By making a
SourceInterceptorFactory.SourceInterceptorOrder available in the Registry with this key, the order in which the
SourceInterceptorFactories products will be applied to the applicable components. |
| Modifier and Type | Method and Description |
|---|---|
default boolean |
intercept(ComponentLocation location)
Determines if a
SourceInterceptor shall be created by this factory to be applied to a component based on some of its
attributes. |
static final String SOURCE_INTERCEPTORS_ORDER_REGISTRY_KEY
SourceInterceptorFactory.SourceInterceptorOrder available in the Registry with this key, the order in which the
SourceInterceptorFactories products will be applied to the applicable components. can be
customized.
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 #addInterceptorFactory(SourceInterceptorFactory)
(in this order):
com.plugin.SomeInterceptororg.mule.MuleInterceptororg.package.logging.LoggerInterceptorcom.plugin.SomeOtherInterceptororg.mule.OtherMuleInterceptorfactories will be sorted, when obtained through #getInterceptorFactories()
like this:
org.package.logging.LoggerInterceptorcom.plugin.SomeInterceptorcom.plugin.SomeOtherInterceptororg.mule.MuleInterceptororg.mule.OtherMuleInterceptordefault boolean intercept(ComponentLocation location)
SourceInterceptor shall be created by this factory to be applied to a component based on some of its
attributes.location - the location and identification properties of the to-be intercepted component in the mule app configuration.true if this handler must be applied to the component with the provided parameters, false otherwise.Copyright © 2021 MuleSoft, Inc.. All rights reserved.