From 35a408038c1de64a6f13f0e7b246a645e9945e3c Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Tue, 18 Mar 2008 22:44:58 +0000
Subject: [PATCH] With this refactoring:
---
opends/src/server/org/opends/server/protocols/jmx/RmiAuthenticator.java | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/opends/src/server/org/opends/server/protocols/jmx/RmiAuthenticator.java b/opends/src/server/org/opends/server/protocols/jmx/RmiAuthenticator.java
index 73a0afb..2cf741a 100644
--- a/opends/src/server/org/opends/server/protocols/jmx/RmiAuthenticator.java
+++ b/opends/src/server/org/opends/server/protocols/jmx/RmiAuthenticator.java
@@ -32,7 +32,7 @@
import javax.management.remote.JMXAuthenticator;
import javax.security.auth.Subject;
-import org.opends.server.api.plugin.PostConnectPluginResult;
+import org.opends.server.api.plugin.PluginResult;
import org.opends.server.core.BindOperationBasis;
import org.opends.server.core.DirectoryServer;
import org.opends.server.core.PluginConfigManager;
@@ -199,11 +199,22 @@
// invoke the post-connect plugins.
PluginConfigManager pluginManager = DirectoryServer
.getPluginConfigManager();
- PostConnectPluginResult pluginResult = pluginManager
+ PluginResult.PostConnect pluginResult = pluginManager
.invokePostConnectPlugins(jmxClientConnection);
- if (pluginResult.connectionTerminated())
+ if (!pluginResult.continueProcessing())
{
- SecurityException se = new SecurityException(pluginResult.toString());
+ jmxClientConnection.disconnect(pluginResult.getDisconnectReason(),
+ pluginResult.sendDisconnectNotification(),
+ pluginResult.getErrorMessage());
+
+ if (debugEnabled())
+ {
+ TRACER.debugVerbose("Disconnect result from post connect plugins: " +
+ "%s: %s ", pluginResult.getDisconnectReason(),
+ pluginResult.getErrorMessage());
+ }
+
+ SecurityException se = new SecurityException();
throw se;
}
--
Gitblit v1.10.0