public abstract class AbstractInterceptable extends Object implements org.mule.runtime.extension.api.runtime.Interceptable, org.mule.runtime.api.lifecycle.Lifecycle
Interceptable.
Besides holding and managing a List of interceptors, this class also implements Lifecycle
making sure that all the lifecycle phases are propagated to all the contained interceptors.
It also provides behaviour for performing dependency injection into those interceptors, including holding a
muleContext instance which is declared as an injection target.
| Modifier and Type | Field and Description |
|---|---|
protected MuleContext |
muleContext |
| Constructor and Description |
|---|
AbstractInterceptable(List<org.mule.runtime.extension.api.runtime.operation.Interceptor> interceptors)
Creates a new instance with the given
interceptor |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Propagates this phase to all the
interceptors. |
List<org.mule.runtime.extension.api.runtime.operation.Interceptor> |
getInterceptors() |
void |
initialise()
Propagates this phase to all the
interceptors |
void |
start()
Propagates this phase to all the
interceptors |
void |
stop()
Propagates this phase to all the
interceptors. |
@Inject protected MuleContext muleContext
public void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
interceptorsinitialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationException - in case of errorpublic void start()
throws org.mule.runtime.api.exception.MuleException
interceptorsstart in interface org.mule.runtime.api.lifecycle.Startableorg.mule.runtime.api.exception.MuleException - in case of errorpublic void stop()
throws org.mule.runtime.api.exception.MuleException
interceptors. All the interceptors held will receive the phase
regardless of any (or all) of them throwing exceptions, in which case, exceptions will be logged.stop in interface org.mule.runtime.api.lifecycle.Stoppableorg.mule.runtime.api.exception.MuleException - if case of errorpublic void dispose()
interceptors. All the interceptors held will receive the phase
regardless of any (or all) of them throwing exceptions, in which case, exceptions will be logged.dispose in interface org.mule.runtime.api.lifecycle.Disposableorg.mule.runtime.api.exception.MuleException - if case of errorpublic final List<org.mule.runtime.extension.api.runtime.operation.Interceptor> getInterceptors()
getInterceptors in interface org.mule.runtime.extension.api.runtime.InterceptableCopyright © 2003–2024 MuleSoft, Inc.. All rights reserved.