From b4f8838b15342670c31753a484abf0129e3c9653 Mon Sep 17 00:00:00 2001
From: jcduff <jcduff@localhost>
Date: Thu, 23 Oct 2008 14:04:24 +0000
Subject: [PATCH] The commit will bring the following features : - An updated version of the underlying database. BDB JE 3.3 is now used. - Attribute API refactoring providing a better abstraction and offering improved performances. - A new GUI called the Control-Panel to replace the Status-Panel: the specifications for this GUI are available on OpenDS Wiki and contains a link to a mockup. See <https://www.opends.org/wiki/page/ControlPanelUISpecification>. - Some changes in the replication protocol to implement "Assured Replication Mode". The specifications are on OpenDS Wiki at <https://www.opends.org/wiki/page/AssuredMode> and section 7 described some of the replication changes required to support this. Assured Replication is not finished, but the main replication protocol changes to support it are done. As explained by Gilles on an email on the Dev mailing list (http://markmail.org/message/46rgo3meq3vriy4a), with these changes the newer versions of OpenDS may not be able to replicate with OpenDS 1.0 instances. - Support for Service Tags on the platforms where the functionality is available and enabled. Specifications are published at <https://www.opends.org/wiki/page/OpenDSServiceTagEnabled>. For more information on Service Tags see <http://wikis.sun.com/display/ServiceTag/Sun+Service+Tag+FAQ>. - The Admin Connector service. In order to provide agentry of the OpenDS server at any time, a new service has been added, dedicated to the administration, configuration and monitoring of the server. An overview of the Admin Connector service and it's use is available on the OpenDS wiki <https://www.opends.org/wiki/page/ManagingAdministrationTrafficToTheServer> - Updates to the various command line tools to support the Admin Connector service. - Some internal re-architecting of the server to put the foundation of future developments such as virtual directory services. The new NetworkGroups and WorkFlow internal services which have been specified in <https://www.opends.org/wiki/page/BasicOperationRoutingThroughNetworkGroup> are now implemented. - Many bug fixes...
---
opendj-sdk/opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java | 64 ++++++++++++++++++++++++++------
1 files changed, 52 insertions(+), 12 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java b/opendj-sdk/opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java
index f778f8e..781e6fa 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java
@@ -50,8 +50,10 @@
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.types.AbstractOperation;
import org.opends.server.types.Attribute;
+import org.opends.server.types.AttributeBuilder;
import org.opends.server.types.AttributeType;
import org.opends.server.types.AttributeValue;
+import org.opends.server.types.Attributes;
import org.opends.server.types.AuthenticationInfo;
import org.opends.server.types.ByteString;
import org.opends.server.types.CancelRequest;
@@ -195,16 +197,18 @@
ATTR_ROOTDN_ALTERNATE_BIND_DN, true);
LinkedList<Attribute> attrList = new LinkedList<Attribute>();
- attrList.add(new Attribute(ATTR_COMMON_NAME, commonName));
+ attrList.add(Attributes.create(ATTR_COMMON_NAME,
+ commonName));
userAttrs.put(cnAT, attrList);
attrList = new LinkedList<Attribute>();
- attrList.add(new Attribute(ATTR_SN, commonName));
+ attrList.add(Attributes.create(ATTR_SN, commonName));
userAttrs.put(snAT, attrList);
attrList = new LinkedList<Attribute>();
- attrList.add(new Attribute(ATTR_ROOTDN_ALTERNATE_BIND_DN,
- shortDNString));
+ attrList.add(Attributes.create(
+ ATTR_ROOTDN_ALTERNATE_BIND_DN,
+ shortDNString));
userAttrs.put(altDNAT, attrList);
@@ -215,16 +219,13 @@
DirectoryServer.getAttributeType(OP_ATTR_PRIVILEGE_NAME,
true);
- LinkedHashSet<AttributeValue> values =
- new LinkedHashSet<AttributeValue>();
+ AttributeBuilder builder = new AttributeBuilder(privType);
for (Privilege p : Privilege.getDefaultRootPrivileges())
{
- values.add(new AttributeValue(privType, p.getName()));
+ builder.add(new AttributeValue(privType, p.getName()));
}
- Attribute privAttr =
- new Attribute(privType, OP_ATTR_PRIVILEGE_NAME, values);
attrList = new LinkedList<Attribute>();
- attrList.add(privAttr);
+ attrList.add(builder.toAttribute());
operationalAttrs.put(privType, attrList);
@@ -480,7 +481,7 @@
mayExtend=false,
mayInvoke=false)
@Override()
- public ConnectionHandler getConnectionHandler()
+ public ConnectionHandler<?> getConnectionHandler()
{
return InternalConnectionHandler.getInstance();
}
@@ -516,6 +517,19 @@
/**
+ * Retrieves the port number for this connection on the client
+ * system.
+ *
+ * @return The port number for this connection on the client system.
+ */
+ public int getClientPort()
+ {
+ return -1;
+ }
+
+
+
+ /**
* Retrieves a string representation of the address on the server to
* which the client connected.
*
@@ -531,6 +545,21 @@
/**
+ * Retrieves the port number for this connection on the server
+ * system if available.
+ *
+ * @return The port number for this connection on the server system
+ * or -1 if there is no server port associated with this
+ * connection (e.g. internal client).
+ */
+ public int getServerPort()
+ {
+ return -1;
+ }
+
+
+
+ /**
* Retrieves the <CODE>java.net.InetAddress</CODE> associated with
* the remote client system.
*
@@ -1045,7 +1074,7 @@
{
if (a.getAttributeType().isObjectClassType())
{
- for (AttributeValue v : a.getValues())
+ for (AttributeValue v : a)
{
String ocName = v.getStringValue();
String lowerName = toLowerCase(ocName);
@@ -3072,5 +3101,16 @@
{
rootConnection = null;
}
+
+ /**
+ * To be implemented.
+ *
+ * @return number of operations performed on this connection
+ */
+ @Override
+ public long getNumberOfOperations() {
+ // Internal operations will not be limited.
+ return 0;
+ }
}
--
Gitblit v1.10.0