From 6c8c8af443daf3817bf6ab643f1d210d31c11d2a Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Tue, 12 Dec 2006 23:55:39 +0000
Subject: [PATCH] Publish a separate monitor entry for each connection handler, which includes the protocol, listen address/port, number of established connections, and information about each connection.
---
opendj-sdk/opends/src/server/org/opends/server/protocols/internal/InternalConnectionHandler.java | 45 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 45 insertions(+), 0 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/protocols/internal/InternalConnectionHandler.java b/opendj-sdk/opends/src/server/org/opends/server/protocols/internal/InternalConnectionHandler.java
index 83578ab..6a37060 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/protocols/internal/InternalConnectionHandler.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/protocols/internal/InternalConnectionHandler.java
@@ -36,6 +36,7 @@
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.types.InitializationException;
+import org.opends.server.types.HostPort;
import static org.opends.server.loggers.Debug.*;
@@ -65,6 +66,12 @@
// handler.
private LinkedList<ClientConnection> connectionList;
+ // The list of listeners associated with this connection handler.
+ private LinkedList<HostPort> listeners;
+
+ // The name of the protocol for this connection handler.
+ private String protocol;
+
/**
@@ -81,7 +88,9 @@
// Since we can't guarantee that the initializeConnectionHandler
// method will always be called for this method, we'll do the
// necessary "initialization" here.
+ protocol = "internal";
connectionList = new LinkedList<ClientConnection>();
+ listeners = new LinkedList<HostPort>();
}
@@ -154,6 +163,42 @@
/**
+ * {@inheritDoc}
+ */
+ public String getConnectionHandlerName()
+ {
+ assert debugEnter(CLASS_NAME, "getConnectionHandlerName");
+
+ return "Internal Connection Handler";
+ }
+
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getProtocol()
+ {
+ assert debugEnter(CLASS_NAME, "getProtocol");
+
+ return protocol;
+ }
+
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection<HostPort> getListeners()
+ {
+ assert debugEnter(CLASS_NAME, "getProtocol");
+
+ return listeners;
+ }
+
+
+
+ /**
* Retrieves the set of active client connections that have been
* established through this connection handler.
*
--
Gitblit v1.10.0