Class BaseChainExecutionPathTreeVisitor
- All Implemented Interfaces:
ChainExecutionPathTreeVisitor
ChainExecutionPathTreeVisitor with default methods implementation.- Since:
- 1.1.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled after a component that will always interrupt the execution flow of a chain prematurely and with an error.voiderrorHandlerCouldBeInvoked(ChainExecutionPathTree errorHandler, org.mule.runtime.api.message.ErrorType errorType) Called after an operation is found that may raise an error that would incur in the invocation of the .voidCalled after the last component in an#ERROR_HANDLER.voidCalled after the last component in an#ERROR_HANDLERif the error has finished to be propagated to other error handlers.booleanThis method will be called before starting the traversal of an error handler.voidfinishReferencedOperation(ChainExecutionPathTree operation) Called after a reference was traversed, to mark that the referencedChainExecutionPathTreehas finished.voidinnerRouteFinished(ChainExecutionPathTree innerChain) Called after the last component in a#ROUTEwithin a#ROUTER.booleaninnerRouteStarted(ChainExecutionPathTree innerChain) Called when a#ROUTEwithin a#ROUTERis found in the execution tree.voidrouterFinished(ChainExecutionPathTree router) Called after the last#ROUTEwithin a#ROUTERwas visited.voidCalled after the#ROUTE/#CHAINwithin a#SCOPEwas visited.voidvisitReferencedOperation(ChainExecutionPathTree operation) Called when an#OPERATIONthat references to another operation in the execution tree.booleanvisitRouter(ChainExecutionPathTree router) Called when a#ROUTERis found in the execution tree.booleanvisitScope(ChainExecutionPathTree scope) Called when a#SCOPEis found in the execution tree.voidvisitSimpleOperation(ChainExecutionPathTree operation) Called when a simple#OPERATIONis found in the execution tree.voidvisitSource(ChainExecutionPathTree source) Called when a#SOURCEis found in the execution tree.
-
Constructor Details
-
BaseChainExecutionPathTreeVisitor
public BaseChainExecutionPathTreeVisitor()
-
-
Method Details
-
visitSource
Description copied from interface:ChainExecutionPathTreeVisitorCalled when a#SOURCEis found in the execution tree.If the chain is a
#FLOWwith a#SOURCE, this will be the first method called when visiting the chain.- Specified by:
visitSourcein interfaceChainExecutionPathTreeVisitor- Parameters:
source- the tree representing visited source
-
visitSimpleOperation
Description copied from interface:ChainExecutionPathTreeVisitorCalled when a simple#OPERATIONis found in the execution tree.A simple
#OPERATIONis any operation within a chain that is not a#SCOPEor#ROUTER.- Specified by:
visitSimpleOperationin interfaceChainExecutionPathTreeVisitor- Parameters:
operation- the visited simple operation.
-
visitReferencedOperation
Description copied from interface:ChainExecutionPathTreeVisitorCalled when an#OPERATIONthat references to another operation in the execution tree.This could be the case of a Flow Reference Operation.
- Specified by:
visitReferencedOperationin interfaceChainExecutionPathTreeVisitor- Parameters:
operation- the visited reference operation.
-
finishReferencedOperation
Description copied from interface:ChainExecutionPathTreeVisitorCalled after a reference was traversed, to mark that the referencedChainExecutionPathTreehas finished.- Specified by:
finishReferencedOperationin interfaceChainExecutionPathTreeVisitor
-
visitScope
Description copied from interface:ChainExecutionPathTreeVisitorCalled when a#SCOPEis found in the execution tree.After this method is called, if it returns
trueit will proceed to visit its inner components. After that,ChainExecutionPathTreeVisitor.scopeFinished(ChainExecutionPathTree)will be called and then the method for the component right after the scope the last call to that method. IfChainExecutionPathTreeVisitor.visitScope(ChainExecutionPathTree)returnedfalse, this method won't be called.- Specified by:
visitScopein interfaceChainExecutionPathTreeVisitor- Parameters:
scope- the visited scope.- Returns:
trueif the visitor should visit the inner components of the#SCOPE, orfalseif it should just skip to the next element. If it istrue, then every inner component of this particular#SCOPEwill be visited.
-
scopeFinished
Description copied from interface:ChainExecutionPathTreeVisitorCalled after the#ROUTE/#CHAINwithin a#SCOPEwas visited.This is a delimiter call. This will only be called after
ChainExecutionPathTreeVisitor.visitScope(ChainExecutionPathTree)and will be referred to the last call to that method.- Specified by:
scopeFinishedin interfaceChainExecutionPathTreeVisitor
-
visitRouter
Description copied from interface:ChainExecutionPathTreeVisitorCalled when a#ROUTERis found in the execution tree.After this method is called, if it returns {@link true}, for each of its inner chains
ChainExecutionPathTreeVisitor.innerRouteStarted(ChainExecutionPathTree)(ComponentAst)} followed by the calls that correspond to its inner components, and thenChainExecutionPathTreeVisitor.routerFinished(ChainExecutionPathTree)will be called. After all inner chains have been navigated,ChainExecutionPathTreeVisitor.routerFinished(ChainExecutionPathTree)will be called with the sameComponentAstof this#ROUTER, and the method for the component right after the scope will be called.- Specified by:
visitRouterin interfaceChainExecutionPathTreeVisitor- Parameters:
router- the visited router.- Returns:
trueif the visitor should visit the inner components of the#ROUTER, orfalseif it should just skip to the next element.
-
innerRouteStarted
Description copied from interface:ChainExecutionPathTreeVisitorCalled when a#ROUTEwithin a#ROUTERis found in the execution tree.This is a delimiter call. The finish of the innerChain started here will be notified by a call to
ChainExecutionPathTreeVisitor.innerRouteFinished(ChainExecutionPathTree). This wil only be called ifChainExecutionPathTreeVisitor.visitRouter(ChainExecutionPathTree)returned true.- Specified by:
innerRouteStartedin interfaceChainExecutionPathTreeVisitor- Parameters:
innerChain- the visited innerChain.- Returns:
- true if this particular route is required to be started.
-
innerRouteFinished
Description copied from interface:ChainExecutionPathTreeVisitorCalled after the last component in a#ROUTEwithin a#ROUTER.This is a delimiter call. This will only be called after
ChainExecutionPathTreeVisitor.innerRouteStarted(ChainExecutionPathTree)and will apply to the innerChain indicated in the last call to that method.- Specified by:
innerRouteFinishedin interfaceChainExecutionPathTreeVisitor- Parameters:
innerChain- the visited innerChain
-
routerFinished
Description copied from interface:ChainExecutionPathTreeVisitorCalled after the last#ROUTEwithin a#ROUTERwas visited.This is a delimiter call. This will only be called after
ChainExecutionPathTreeVisitor.visitRouter(ChainExecutionPathTree)and will be referred to the last call to that method. IfChainExecutionPathTreeVisitor.visitRouter(ChainExecutionPathTree)returnedfalse, this method won't be called.- Specified by:
routerFinishedin interfaceChainExecutionPathTreeVisitor
-
errorHandlerCouldBeInvoked
public void errorHandlerCouldBeInvoked(ChainExecutionPathTree errorHandler, org.mule.runtime.api.message.ErrorType errorType) Description copied from interface:ChainExecutionPathTreeVisitorCalled after an operation is found that may raise an error that would incur in the invocation of the . This also includes the case of an OnErrorPropagate, which in the end propagates as well to this error handler. The visitor must consider that this method may be called for the same error handler for every error that may occur and this matches.- Specified by:
errorHandlerCouldBeInvokedin interfaceChainExecutionPathTreeVisitor- Parameters:
errorHandler- theChainExecutionPathTreecorresponding to the error handler that could be invoked.errorType- theErrorTypeof the error that the operation may raise.
-
errorHandlerStarted
Description copied from interface:ChainExecutionPathTreeVisitorThis method will be called before starting the traversal of an error handler. This will be called after the entire chain of the owner of this ErrorHandler has been traversed, which will allow to retrieve all the potential calls to this, which are modeled with#errorHandlerCouldBeInvoked(ChainExecutionPathTree).If there is the need to continue the propagation (i.e. this is an on error propagate handler), it will as well invoke
#errorHandlerCouldBeInvoked(ChainExecutionPathTree)after the propagation of this one is finished.- Specified by:
errorHandlerStartedin interfaceChainExecutionPathTreeVisitor- Parameters:
handler- the visited error handler- Returns:
trueif the visitor should travers this error handler (ChainExecutionPathTreeVisitor.errorHandlerFinished(ChainExecutionPathTree)won't be invoked if this returnsfalse).
-
errorHandlerFinished
Description copied from interface:ChainExecutionPathTreeVisitorCalled after the last component in an#ERROR_HANDLER.This is a delimiter call. This will only be called after
ChainExecutionPathTreeVisitor.errorHandlerStarted(ChainExecutionPathTree).- Specified by:
errorHandlerFinishedin interfaceChainExecutionPathTreeVisitor- Parameters:
handler- the visited error handler.
-
errorHandlerPropagationComplete
Description copied from interface:ChainExecutionPathTreeVisitorCalled after the last component in an#ERROR_HANDLERif the error has finished to be propagated to other error handlers. This is, for example, if the current is an on-error-continue, or if we reached the last level of error handling to be able to handle the error (e.g. the main flow). This method will be called for every that the originating component may throw, as far as there is at least an error handler to handle it.This is a delimiter call. The finish of the error handler started here will be notified by a call to
ChainExecutionPathTreeVisitor.errorHandlerFinished(ChainExecutionPathTree), including for this last , to then call this method.- Specified by:
errorHandlerPropagationCompletein interfaceChainExecutionPathTreeVisitor- Parameters:
handler- the visited error handler
-
chainInterruptedWithError
Description copied from interface:ChainExecutionPathTreeVisitorCalled after a component that will always interrupt the execution flow of a chain prematurely and with an error.This represents a situation in which, if there are other nodes after this one, they will never be executed.
- Specified by:
chainInterruptedWithErrorin interfaceChainExecutionPathTreeVisitor- Parameters:
chain- the interrupted chain.
-