From 05dfa5fee15b191c3ee1afae0010b70733b1a35b Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Mon, 25 Jun 2007 15:51:57 +0000
Subject: [PATCH] Update the pre-parse and pre-operation plugin results to add the ability to skip core processing without skipping post-operation plugins. Also, make sure that post-response plugins are always invoked for all operations that get far enough in their processing to have called the pre-parse plugins.
---
opends/src/server/org/opends/server/core/SearchOperation.java | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/SearchOperation.java b/opends/src/server/org/opends/server/core/SearchOperation.java
index 9b8fad7..007fd1d 100644
--- a/opends/src/server/org/opends/server/core/SearchOperation.java
+++ b/opends/src/server/org/opends/server/core/SearchOperation.java
@@ -1551,6 +1551,7 @@
logSearchRequest(this);
logSearchResultDone(this);
+ pluginConfigManager.invokePostResponseSearchPlugins(this);
return;
}
else if (preParseResult.sendResponseImmediately())
@@ -1559,6 +1560,11 @@
logSearchRequest(this);
break searchProcessing;
}
+ else if (preParseResult.skipCoreProcessing())
+ {
+ skipPostOperation = false;
+ break searchProcessing;
+ }
// Log the search request message.
@@ -1571,6 +1577,7 @@
indicateCancelled(cancelRequest);
processingStopTime = System.currentTimeMillis();
logSearchResultDone(this);
+ pluginConfigManager.invokePostResponseSearchPlugins(this);
return;
}
@@ -2037,6 +2044,7 @@
indicateCancelled(cancelRequest);
processingStopTime = System.currentTimeMillis();
logSearchResultDone(this);
+ pluginConfigManager.invokePostResponseSearchPlugins(this);
return;
}
@@ -2055,6 +2063,7 @@
processingStopTime = System.currentTimeMillis();
logSearchResultDone(this);
+ pluginConfigManager.invokePostResponseSearchPlugins(this);
return;
}
else if (preOpResult.sendResponseImmediately())
@@ -2062,6 +2071,11 @@
skipPostOperation = true;
break searchProcessing;
}
+ else if (preOpResult.skipCoreProcessing())
+ {
+ skipPostOperation = false;
+ break searchProcessing;
+ }
// Check for and handle a request to cancel this operation.
@@ -2070,6 +2084,7 @@
indicateCancelled(cancelRequest);
processingStopTime = System.currentTimeMillis();
logSearchResultDone(this);
+ pluginConfigManager.invokePostResponseSearchPlugins(this);
return;
}
@@ -2184,6 +2199,7 @@
indicateCancelled(cancelRequest);
processingStopTime = System.currentTimeMillis();
logSearchResultDone(this);
+ pluginConfigManager.invokePostResponseSearchPlugins(this);
return;
}
@@ -2202,6 +2218,7 @@
processingStopTime = System.currentTimeMillis();
logSearchResultDone(this);
+ pluginConfigManager.invokePostResponseSearchPlugins(this);
return;
}
}
--
Gitblit v1.10.0