Interface ProgressReporter
- All Known Implementing Classes:
OrchestratorAgent
-
Method Summary
Modifier and TypeMethodDescriptionvoidIf agent finds critical finding during file procession, and before continuing with the next file, it will notify the orchestrator of the escalation, and stop the work.voidupdateProgress(String reviewId, String currentFile)
-
Method Details
-
updateProgress
-
escalate
If agent finds critical finding during file procession, and before continuing with the next file, it will notify the orchestrator of the escalation, and stop the work. The agent notifies orchestrator this by calling this method (the orchestrator implements this interface), and, in fact, the orchestrator should stop the agent, by using CountDownLatch mechanism.
By calling this method, the agent sends the reviewId, as well as information about his finding for the file it processes ( Severity - CRITICAL, INFO, WARNING, then lineNumber, ...) Knowing rewiewId and Finding, this method then sends the Finding on deciding what to do - let's call the mechanism that decides what to do next - the Escalation Handler
This method will be called by the
. Since the implementation of this method typically uses java.util.concurrent.CountDownLatch await(), this means SubAgent#execute() will wait (being blocked), it will remain in this state until another thread - in our case,invalid reference
SubAgent#execute()- calls countDown()invalid reference
OrchestratorAgent#resumeAfterEscalation()- Parameters:
reviewId-finding-
-