From db17d33f07eb19a8ca12109a72d389fb706a9521 Mon Sep 17 00:00:00 2001 From: chanikag Date: Tue, 22 Aug 2023 15:26:09 +0530 Subject: [PATCH] Rename handler -> sequence observer --- .../config/SequenceFlowObserversLoader.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/core/src/main/java/org/apache/synapse/config/SequenceFlowObserversLoader.java b/modules/core/src/main/java/org/apache/synapse/config/SequenceFlowObserversLoader.java index 85f775942a..e4cff53ae5 100644 --- a/modules/core/src/main/java/org/apache/synapse/config/SequenceFlowObserversLoader.java +++ b/modules/core/src/main/java/org/apache/synapse/config/SequenceFlowObserversLoader.java @@ -41,13 +41,13 @@ public class SequenceFlowObserversLoader { private static Log log = LogFactory.getLog(SequenceFlowObserversLoader.class); public static List loadObservers() { - List handlers = new ArrayList<>(); + List observers = new ArrayList<>(); OMElement observersConfig = MiscellaneousUtil.loadXMLConfig(SynapseConstants.SEQUENCE_OBSERVERS_FILE); if (observersConfig != null) { if (!ROOT_Q.equals(observersConfig.getQName())) { - handleException("Invalid handler configuration file"); + handleException("Invalid sequence observer configuration file"); } Iterator iterator = observersConfig.getChildrenWithName(OBSERVER_Q); @@ -58,7 +58,7 @@ public static List loadObservers() { if (observerElem.getAttribute(NAME_ATT) != null) { name = observerElem.getAttributeValue(NAME_ATT); } else { - handleException("Name not defined in one or more handlers"); + handleException("Name not defined in one or more sequence observer"); } if (observerElem.getAttribute(CLASS_Q) != null) { @@ -66,19 +66,19 @@ public static List loadObservers() { if (!"".equals(className)) { SequenceFlowObserver observer = createObserver(className); if (observer != null) { - handlers.add(observer); + observers.add(observer); observer.setName(name); } } else { - handleException("Class name is null for handle name : " + name); + handleException("Class name is null for sequence observer name : " + name); } } else { - handleException("Class name not defined for handler named : " + name); + handleException("Class name not defined for sequence observer named : " + name); } } } - return handlers; + return observers; } private static SequenceFlowObserver createObserver(String classFQName) { @@ -86,14 +86,14 @@ private static SequenceFlowObserver createObserver(String classFQName) { try { obj = Class.forName(classFQName).newInstance(); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) { - handleException("Error creating Handler for class name : " + classFQName, e); + handleException("Error creating Sequence observer for class name : " + classFQName, e); } if (obj instanceof SequenceFlowObserver) { return (SequenceFlowObserver) obj; } else { - handleException("Error creating Handler. The Handler should be of type " + - "org.apache.synapse.Handler"); + handleException("Error creating Sequence observer. The Sequence observer should be of type " + + "org.apache.synapse.SequenceFlowObserver"); } return null; }