From 2964e0f4cbf0dcee17b1d333a0ac3312e9a5370d Mon Sep 17 00:00:00 2001
From: floblanc <floblanc@localhost>
Date: Wed, 29 Oct 2008 10:40:13 +0000
Subject: [PATCH] Implement a network group dedicated to the admin connector: - this network group is not configurable, and unbreakable - all connections handled by the admin connector are managed by this network group - all JMX connections are managed by this network group - this network group provides access to all private and public suffixes
---
opends/src/server/org/opends/server/core/networkgroups/NetworkGroup.java | 49 ++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 42 insertions(+), 7 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/networkgroups/NetworkGroup.java b/opends/src/server/org/opends/server/core/networkgroups/NetworkGroup.java
index 91eed31..3c4f11c 100644
--- a/opends/src/server/org/opends/server/core/networkgroups/NetworkGroup.java
+++ b/opends/src/server/org/opends/server/core/networkgroups/NetworkGroup.java
@@ -84,6 +84,20 @@
new NetworkGroup ("default");
+ // The admin network group (singleton).
+ // The admin network group has no criterion, no policy, and gives
+ // access to all the workflows.
+ private static NetworkGroup adminNetworkGroup =
+ new NetworkGroup ("admin");
+
+ // The internal network group (singleton).
+ // The internal network group has no criterion, no policy, and gives
+ // access to all the workflows. The purpose of the internal network
+ // group is to allow internal connections to perform operations.
+ private static NetworkGroup internalNetworkGroup =
+ new NetworkGroup("internal");
+
+
// The list of all network groups that are registered with the server.
// The defaultNetworkGroup is not in the list of registered network groups.
private static TreeMap<String, NetworkGroup> registeredNetworkGroups =
@@ -411,13 +425,6 @@
// Rebuild the list of naming context handled by the network group
rebuildNamingContextList();
}
-
- // If the workflow has been deregistered then deregister it with
- // the default network group as well
- if (deregistered && (this != defaultNetworkGroup))
- {
- defaultNetworkGroup.deregisterWorkflow(workflow);
- }
}
@@ -771,6 +778,26 @@
/**
+ * Returns the admin network group.
+ * @return the admin network group
+ */
+ public static NetworkGroup getAdminNetworkGroup()
+ {
+ return adminNetworkGroup;
+ }
+
+
+ /**
+ * Returns the internal network group.
+ * @return the internal network group
+ */
+ public static NetworkGroup getInternalNetworkGroup()
+ {
+ return internalNetworkGroup;
+ }
+
+
+ /**
* Rebuilds the list of naming contexts handled by the network group.
* This operation should be performed whenever a workflow topology
* has been updated (workflow registration or de-registration).
@@ -853,9 +880,14 @@
networkGroup.invalidate();
}
defaultNetworkGroup.invalidate();
+ adminNetworkGroup.invalidate();
+ internalNetworkGroup.invalidate();
registeredNetworkGroups = new TreeMap<String,NetworkGroup>();
+ orderedNetworkGroups = new ArrayList<NetworkGroup>();
defaultNetworkGroup = new NetworkGroup ("default");
+ adminNetworkGroup = new NetworkGroup ("admin");
+ internalNetworkGroup = new NetworkGroup("internal");
}
}
@@ -915,11 +947,14 @@
{
// Reset the default network group
defaultNetworkGroup.reset();
+ adminNetworkGroup.reset();
+ internalNetworkGroup.reset();
// Reset all the registered network group
synchronized (registeredNetworkGroupsLock)
{
registeredNetworkGroups = new TreeMap<String, NetworkGroup>();
+ orderedNetworkGroups = new ArrayList<NetworkGroup>();
}
}
--
Gitblit v1.10.0