public class SourcePolicyProcessor extends Object implements Processor
MessageSource.
In order for this class to be able to execute a policy it requires an PolicyChain with the content of the policy. Such
policy may have an PolicyNextActionMessageProcessor which will be the one used to execute the provided
Processor which may be another policy or the actual logic behind the
MessageSource which typically is a flow execution.
This class enforces the scoping of variables between the actual behaviour and the policy that may be applied to it. To enforce
such scoping of variables it uses PolicyStateHandler so the last Event modified by the policy behaviour can be
stored and retrieve for later usages. It also uses PolicyEventConverter as a helper class to convert an Event
from the policy to the next operation Event or from the next operation result to the Event that must continue
the execution of the policy.
If a non-empty sourcePolicyParametersTransformer is passed to this class, then it will be used to convert the result of
the policy chain execution to the set of parameters that the success response function or the failure response function will be
used to execute.ReactiveProcessor.ProcessingType| Constructor and Description |
|---|
SourcePolicyProcessor(Policy policy,
PolicyStateHandler policyStateHandler,
Processor nextProcessor)
Creates a new
DefaultSourcePolicy. |
| Modifier and Type | Method and Description |
|---|---|
Event |
process(Event sourceEvent)
Process the source policy chain of processors.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetProcessingTypepublic SourcePolicyProcessor(Policy policy, PolicyStateHandler policyStateHandler, Processor nextProcessor)
DefaultSourcePolicy.policy - the policy to execute before and after the source.policyStateHandler - the state handler for the policy.nextProcessor - the next-operation processor implementation, it may be another policy or the flow execution.public Event process(Event sourceEvent) throws org.mule.runtime.api.exception.MuleException
nextOperation function has the behaviour to be executed
by the next-operation of the chain which may be the next policy in the chain or the flow execution.Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.