opends/src/server/org/opends/server/api/plugin/PreOperationPluginResult.java
@@ -55,6 +55,10 @@ // from this plugin to the client with no further processing. private final boolean sendResponseImmediately; // Indicates whether the server should skip the core processing for // the associated operation. private final boolean skipCoreProcessing; /** @@ -67,7 +71,7 @@ */ private PreOperationPluginResult() { this(false, true, false); this(false, true, false, false); } @@ -92,9 +96,44 @@ boolean continuePluginProcessing, boolean sendResponseImmediately) { this(connectionTerminated, continuePluginProcessing, sendResponseImmediately, false); } /** * Creates a new pre-operation plugin result with the provided * information. * * @param connectionTerminated Indicates whether the * post-response plugin terminated * the client connection. * @param continuePluginProcessing Indicates whether any further * pre-operation plugins should be * invoked for this operation. * @param sendResponseImmediately Indicates whether the server * should send the response set by * this plugin to the client * immediately with no further * processing on the operation. * @param skipCoreProcessing Indicates whether the server * should skip the core processing * for the operation. If * {@code sendResponseImmediately} * is {@code false}, then any * post-operation plugins will * still be invoked. */ public PreOperationPluginResult(boolean connectionTerminated, boolean continuePluginProcessing, boolean sendResponseImmediately, boolean skipCoreProcessing) { this.connectionTerminated = connectionTerminated; this.continuePluginProcessing = continuePluginProcessing; this.sendResponseImmediately = sendResponseImmediately; this.skipCoreProcessing = skipCoreProcessing; } @@ -146,6 +185,22 @@ /** * Indicates whether the server should skip core processing for the * operation. If {@code sendResponseImmediately} is {@code false}, * then the server will still process any post-operation plugins * that may be registered with the server. * * @return {@code true} if the server should skip core processing * for the operation, or {@code false} if not. */ public boolean skipCoreProcessing() { return skipCoreProcessing; } /** * Retrieves a string representation of this post-response plugin * result. * @@ -176,6 +231,8 @@ buffer.append(continuePluginProcessing); buffer.append(", sendResponseImmediately="); buffer.append(sendResponseImmediately); buffer.append(", skipCoreProcessing="); buffer.append(skipCoreProcessing); buffer.append(")"); } } opends/src/server/org/opends/server/api/plugin/PreParsePluginResult.java
@@ -55,6 +55,10 @@ // from this plugin to the client with no further processing. private final boolean sendResponseImmediately; // Indicates whether the server should skip the core processing for // the associated operation. private final boolean skipCoreProcessing; /** @@ -67,7 +71,7 @@ */ private PreParsePluginResult() { this(false, true, false); this(false, true, false, false); } @@ -92,9 +96,44 @@ boolean continuePluginProcessing, boolean sendResponseImmediately) { this(connectionTerminated, continuePluginProcessing, sendResponseImmediately, false); } /** * Creates a new pre-operation plugin result with the provided * information. * * @param connectionTerminated Indicates whether the * post-response plugin terminated * the client connection. * @param continuePluginProcessing Indicates whether any further * pre-operation plugins should be * invoked for this operation. * @param sendResponseImmediately Indicates whether the server * should send the response set by * this plugin to the client * immediately with no further * processing on the operation. * @param skipCoreProcessing Indicates whether the server * should skip the core processing * for the operation. If * {@code sendResponseImmediately} * is {@code false}, then any * post-operation plugins will * still be invoked. */ public PreParsePluginResult(boolean connectionTerminated, boolean continuePluginProcessing, boolean sendResponseImmediately, boolean skipCoreProcessing) { this.connectionTerminated = connectionTerminated; this.continuePluginProcessing = continuePluginProcessing; this.sendResponseImmediately = sendResponseImmediately; this.skipCoreProcessing = skipCoreProcessing; } @@ -146,6 +185,22 @@ /** * Indicates whether the server should skip core processing for the * operation. If {@code sendResponseImmediately} is {@code false}, * then the server will still process any post-operation plugins * that may be registered with the server. * * @return {@code true} if the server should skip core processing * for the operation, or {@code false} if not. */ public boolean skipCoreProcessing() { return skipCoreProcessing; } /** * Retrieves a string representation of this post-response plugin * result. * @@ -176,6 +231,8 @@ buffer.append(continuePluginProcessing); buffer.append(", sendResponseImmediately="); buffer.append(sendResponseImmediately); buffer.append(", skipCoreProcessing="); buffer.append(skipCoreProcessing); buffer.append(")"); } } opends/src/server/org/opends/server/core/AbandonOperation.java
@@ -306,6 +306,11 @@ skipPostOperation = true; break abandonProcessing; } else if (preParseResult.skipCoreProcessing()) { skipPostOperation = false; break abandonProcessing; } // Log the abandon request message. opends/src/server/org/opends/server/core/AddOperation.java
@@ -800,6 +800,7 @@ logAddRequest(this); logAddResponse(this); pluginConfigManager.invokePostResponseAddPlugins(this); return; } else if (preParseResult.sendResponseImmediately()) @@ -808,6 +809,11 @@ logAddRequest(this); break addProcessing; } else if (preParseResult.skipCoreProcessing()) { skipPostOperation = false; break addProcessing; } // Log the add request message. @@ -820,6 +826,7 @@ indicateCancelled(cancelRequest); processingStopTime = System.currentTimeMillis(); logAddResponse(this); pluginConfigManager.invokePostResponseAddPlugins(this); return; } @@ -958,6 +965,7 @@ indicateCancelled(cancelRequest); processingStopTime = System.currentTimeMillis(); logAddResponse(this); pluginConfigManager.invokePostResponseAddPlugins(this); return; } @@ -1027,6 +1035,7 @@ indicateCancelled(cancelRequest); processingStopTime = System.currentTimeMillis(); logAddResponse(this); pluginConfigManager.invokePostResponseAddPlugins(this); return; } @@ -1936,6 +1945,7 @@ indicateCancelled(cancelRequest); processingStopTime = System.currentTimeMillis(); logAddResponse(this); pluginConfigManager.invokePostResponseAddPlugins(this); return; } @@ -1958,6 +1968,7 @@ processingStopTime = System.currentTimeMillis(); logAddResponse(this); pluginConfigManager.invokePostResponseAddPlugins(this); return; } else if (preOpResult.sendResponseImmediately()) @@ -1965,6 +1976,11 @@ skipPostOperation = true; break addProcessing; } else if (preOpResult.skipCoreProcessing()) { skipPostOperation = false; break addProcessing; } } @@ -1974,6 +1990,7 @@ indicateCancelled(cancelRequest); processingStopTime = System.currentTimeMillis(); logAddResponse(this); pluginConfigManager.invokePostResponseAddPlugins(this); return; } @@ -2223,6 +2240,7 @@ processingStopTime = System.currentTimeMillis(); logAddResponse(this); pluginConfigManager.invokePostResponseAddPlugins(this); return; } } opends/src/server/org/opends/server/core/BindOperation.java
@@ -1009,6 +1009,7 @@ logBindRequest(this); logBindResponse(this); pluginConfigManager.invokePostResponseBindPlugins(this); return; } else if (preParseResult.sendResponseImmediately()) @@ -1017,6 +1018,11 @@ logBindRequest(this); break bindProcessing; } else if (preParseResult.skipCoreProcessing()) { skipPostOperation = false; break bindProcessing; } // Log the bind request message. @@ -1145,6 +1151,7 @@ processingStopTime = System.currentTimeMillis(); logBindResponse(this); pluginConfigManager.invokePostResponseBindPlugins(this); return; } else if (preOpResult.sendResponseImmediately()) @@ -1152,6 +1159,11 @@ skipPostOperation = true; break bindProcessing; } else if (preOpResult.skipCoreProcessing()) { skipPostOperation = false; break bindProcessing; } setResultCode(ResultCode.SUCCESS); authInfo = new AuthenticationInfo(); @@ -1444,6 +1456,7 @@ processingStopTime = System.currentTimeMillis(); logBindResponse(this); pluginConfigManager.invokePostResponseBindPlugins(this); return; } else if (preOpResult.sendResponseImmediately()) @@ -1451,6 +1464,11 @@ skipPostOperation = true; break bindProcessing; } else if (preOpResult.skipCoreProcessing()) { skipPostOperation = false; break bindProcessing; } // Determine whether the provided password matches any of the stored @@ -1737,6 +1755,7 @@ processingStopTime = System.currentTimeMillis(); logBindResponse(this); pluginConfigManager.invokePostResponseBindPlugins(this); return; } else if (preOpResult.sendResponseImmediately()) @@ -1744,6 +1763,11 @@ skipPostOperation = true; break bindProcessing; } else if (preOpResult.skipCoreProcessing()) { skipPostOperation = false; break bindProcessing; } // Actually process the SASL bind. @@ -2244,6 +2268,7 @@ processingStopTime = System.currentTimeMillis(); logBindResponse(this); pluginConfigManager.invokePostResponseBindPlugins(this); return; } } opends/src/server/org/opends/server/core/CompareOperation.java
@@ -575,6 +575,7 @@ logCompareRequest(this); logCompareResponse(this); pluginConfigManager.invokePostResponseComparePlugins(this); return; } else if (preParseResult.sendResponseImmediately()) @@ -583,6 +584,11 @@ logCompareRequest(this); break compareProcessing; } else if (preParseResult.skipCoreProcessing()) { skipPostOperation = false; break compareProcessing; } // Log the compare request message. @@ -595,6 +601,7 @@ indicateCancelled(cancelRequest); processingStopTime = System.currentTimeMillis(); logCompareResponse(this); pluginConfigManager.invokePostResponseComparePlugins(this); return; } @@ -643,6 +650,7 @@ indicateCancelled(cancelRequest); processingStopTime = System.currentTimeMillis(); logCompareResponse(this); pluginConfigManager.invokePostResponseComparePlugins(this); return; } @@ -992,6 +1000,7 @@ indicateCancelled(cancelRequest); processingStopTime = System.currentTimeMillis(); logCompareResponse(this); pluginConfigManager.invokePostResponseComparePlugins(this); return; } @@ -1010,6 +1019,7 @@ processingStopTime = System.currentTimeMillis(); logCompareResponse(this); pluginConfigManager.invokePostResponseComparePlugins(this); return; } else if (preOpResult.sendResponseImmediately()) @@ -1017,6 +1027,11 @@ skipPostOperation = true; break compareProcessing; } else if (preOpResult.skipCoreProcessing()) { skipPostOperation = false; break compareProcessing; } // Get the base attribute type and set of options. @@ -1114,6 +1129,7 @@ indicateCancelled(cancelRequest); processingStopTime = System.currentTimeMillis(); logCompareResponse(this); pluginConfigManager.invokePostResponseComparePlugins(this); return; } @@ -1132,6 +1148,7 @@ processingStopTime = System.currentTimeMillis(); logCompareResponse(this); pluginConfigManager.invokePostResponseComparePlugins(this); return; } } opends/src/server/org/opends/server/core/DeleteOperation.java
@@ -526,6 +526,7 @@ logDeleteRequest(this); logDeleteResponse(this); pluginConfigManager.invokePostResponseDeletePlugins(this); return; } else if (preParseResult.sendResponseImmediately()) @@ -534,6 +535,11 @@ logDeleteRequest(this); break deleteProcessing; } else if (preParseResult.skipCoreProcessing()) { skipPostOperation = false; break deleteProcessing; } // Log the delete request message. @@ -546,6 +552,7 @@ indicateCancelled(cancelRequest); processingStopTime = System.currentTimeMillis(); logDeleteResponse(this); pluginConfigManager.invokePostResponseDeletePlugins(this); return; } @@ -983,6 +990,7 @@ indicateCancelled(cancelRequest); processingStopTime = System.currentTimeMillis(); logDeleteResponse(this); pluginConfigManager.invokePostResponseDeletePlugins(this); return; } @@ -1004,6 +1012,7 @@ processingStopTime = System.currentTimeMillis(); logDeleteResponse(this); pluginConfigManager.invokePostResponseDeletePlugins(this); return; } else if (preOpResult.sendResponseImmediately()) @@ -1011,6 +1020,11 @@ skipPostOperation = true; break deleteProcessing; } else if (preOpResult.skipCoreProcessing()) { skipPostOperation = false; break deleteProcessing; } } @@ -1020,6 +1034,7 @@ indicateCancelled(cancelRequest); processingStopTime = System.currentTimeMillis(); logDeleteResponse(this); pluginConfigManager.invokePostResponseDeletePlugins(this); return; } @@ -1280,6 +1295,7 @@ processingStopTime = System.currentTimeMillis(); logDeleteResponse(this); pluginConfigManager.invokePostResponseDeletePlugins(this); return; } } opends/src/server/org/opends/server/core/ExtendedOperation.java
@@ -484,6 +484,7 @@ logExtendedRequest(this); logExtendedResponse(this); pluginConfigManager.invokePostResponseExtendedPlugins(this); return; } else if (preParseResult.sendResponseImmediately()) @@ -492,6 +493,11 @@ logExtendedRequest(this); break extendedProcessing; } else if (preParseResult.skipCoreProcessing()) { skipPostOperation = false; break extendedProcessing; } // Log the extended request message. @@ -506,6 +512,7 @@ { indicateCancelled(cancelRequest); processingStopTime = System.currentTimeMillis(); pluginConfigManager.invokePostResponseExtendedPlugins(this); return; } } @@ -582,6 +589,7 @@ processingStopTime = System.currentTimeMillis(); logExtendedResponse(this); pluginConfigManager.invokePostResponseExtendedPlugins(this); return; } else if (preOpResult.sendResponseImmediately()) @@ -589,6 +597,11 @@ skipPostOperation = true; break extendedProcessing; } else if (preOpResult.skipCoreProcessing()) { skipPostOperation = false; break extendedProcessing; } // Check for and handle a request to cancel this operation. @@ -599,6 +612,7 @@ { indicateCancelled(cancelRequest); processingStopTime = System.currentTimeMillis(); pluginConfigManager.invokePostResponseExtendedPlugins(this); return; } } @@ -630,6 +644,7 @@ processingStopTime = System.currentTimeMillis(); logExtendedResponse(this); pluginConfigManager.invokePostResponseExtendedPlugins(this); return; } } opends/src/server/org/opends/server/core/ModifyDNOperation.java
@@ -781,6 +781,7 @@ logModifyDNRequest(this); logModifyDNResponse(this); pluginConfigManager.invokePostResponseModifyDNPlugins(this); return; } else if (preParseResult.sendResponseImmediately()) @@ -789,6 +790,11 @@ logModifyDNRequest(this); break modifyDNProcessing; } else if (preParseResult.skipCoreProcessing()) { skipPostOperation = false; break modifyDNProcessing; } // Log the modify DN request message. @@ -801,6 +807,7 @@ indicateCancelled(cancelRequest); processingStopTime = System.currentTimeMillis(); logModifyDNResponse(this); pluginConfigManager.invokePostResponseModifyDNPlugins(this); return; } @@ -936,6 +943,7 @@ indicateCancelled(cancelRequest); processingStopTime = System.currentTimeMillis(); logModifyDNResponse(this); pluginConfigManager.invokePostResponseModifyDNPlugins(this); return; } @@ -1019,6 +1027,7 @@ indicateCancelled(cancelRequest); processingStopTime = System.currentTimeMillis(); logModifyDNResponse(this); pluginConfigManager.invokePostResponseModifyDNPlugins(this); return; } @@ -1564,6 +1573,7 @@ indicateCancelled(cancelRequest); processingStopTime = System.currentTimeMillis(); logModifyDNResponse(this); pluginConfigManager.invokePostResponseModifyDNPlugins(this); return; } @@ -1591,6 +1601,7 @@ processingStopTime = System.currentTimeMillis(); logModifyDNResponse(this); pluginConfigManager.invokePostResponseModifyDNPlugins(this); return; } else if (preOpResult.sendResponseImmediately()) @@ -1598,6 +1609,11 @@ skipPostOperation = true; break modifyDNProcessing; } else if (preOpResult.skipCoreProcessing()) { skipPostOperation = false; break modifyDNProcessing; } } @@ -1784,6 +1800,7 @@ indicateCancelled(cancelRequest); processingStopTime = System.currentTimeMillis(); logModifyDNResponse(this); pluginConfigManager.invokePostResponseModifyDNPlugins(this); return; } @@ -2063,6 +2080,7 @@ processingStopTime = System.currentTimeMillis(); logModifyDNResponse(this); pluginConfigManager.invokePostResponseModifyDNPlugins(this); return; } } opends/src/server/org/opends/server/core/ModifyOperation.java
@@ -717,6 +717,7 @@ logModifyRequest(this); logModifyResponse(this); pluginConfigManager.invokePostResponseModifyPlugins(this); return; } else if (preParseResult.sendResponseImmediately()) @@ -725,6 +726,11 @@ logModifyRequest(this); break modifyProcessing; } else if (preParseResult.skipCoreProcessing()) { skipPostOperation = false; break modifyProcessing; } // Log the modify request message. @@ -737,6 +743,7 @@ indicateCancelled(cancelRequest); processingStopTime = System.currentTimeMillis(); logModifyResponse(this); pluginConfigManager.invokePostResponseModifyPlugins(this); return; } @@ -825,6 +832,7 @@ indicateCancelled(cancelRequest); processingStopTime = System.currentTimeMillis(); logModifyResponse(this); pluginConfigManager.invokePostResponseModifyPlugins(this); return; } @@ -859,6 +867,7 @@ indicateCancelled(cancelRequest); processingStopTime = System.currentTimeMillis(); logModifyResponse(this); pluginConfigManager.invokePostResponseModifyPlugins(this); return; } @@ -2473,6 +2482,7 @@ indicateCancelled(cancelRequest); processingStopTime = System.currentTimeMillis(); logModifyResponse(this); pluginConfigManager.invokePostResponseModifyPlugins(this); return; } @@ -2494,6 +2504,7 @@ processingStopTime = System.currentTimeMillis(); logModifyResponse(this); pluginConfigManager.invokePostResponseModifyPlugins(this); return; } else if (preOpResult.sendResponseImmediately()) @@ -2501,6 +2512,11 @@ skipPostOperation = true; break modifyProcessing; } else if (preOpResult.skipCoreProcessing()) { skipPostOperation = false; break modifyProcessing; } } @@ -2510,6 +2526,7 @@ indicateCancelled(cancelRequest); processingStopTime = System.currentTimeMillis(); logModifyResponse(this); pluginConfigManager.invokePostResponseModifyPlugins(this); return; } @@ -2861,6 +2878,7 @@ processingStopTime = System.currentTimeMillis(); logModifyResponse(this); pluginConfigManager.invokePostResponseModifyPlugins(this); return; } } 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; } }