opends/src/snmp/src/org/opends/server/snmp/DIRECTORY_SERVER_MIBImpl.java
@@ -23,6 +23,7 @@ * * * Copyright 2008 Sun Microsystems, Inc. * Portions Copyright 2012 ForgeRock Inc. */ package org.opends.server.snmp; @@ -56,7 +57,7 @@ */ private DsMIBImpl dsMibGroup = null; /** * ObjectName of the Current Direcotry Server MIB. * ObjectName of the Current Directory Server MIB. */ private ObjectName mibObName; /** @@ -67,7 +68,7 @@ /** * Creates the Current Directory Server MIB. * @param registeredMBean indicates if the SNMP MBean has to register * in the Direcotry Server MBeanServer * in the Directory Server MBeanServer * @param mibName of the Directory Server MIB */ public DIRECTORY_SERVER_MIBImpl(boolean registeredMBean, opends/src/snmp/src/org/opends/server/snmp/DsApplIfOpsEntryImpl.java
@@ -64,7 +64,7 @@ */ private ObjectName connectionHandlerName; /** * SNMPMonitor representing the gateway beetween SNMP MBeans and cn=monitor * SNMPMonitor representing the gateway between SNMP MBeans and cn=monitor * MBeans. */ private SNMPMonitor monitor; @@ -130,7 +130,6 @@ } else { return 0L; } } /** @@ -150,7 +149,6 @@ } else { return 0L; } } /** @@ -170,7 +168,6 @@ } else { return 0L; } } /** @@ -355,7 +352,6 @@ } return null; } return this.entryName; } return this.entryName; } opends/src/snmp/src/org/opends/server/snmp/DsMIBImpl.java
@@ -23,6 +23,7 @@ * * * Copyright 2008-2009 Sun Microsystems, Inc. * Portions Copyright 2012 ForgeRock Inc. */ package org.opends.server.snmp; @@ -43,7 +44,7 @@ /** * The class reprents the "DsMIB" group implementation. * The class represents the "DsMIB" group implementation. * The group is defined with the following oid: 1.3.6.1.2.1.66. */ public class DsMIBImpl extends DsMIB implements NotificationListener { @@ -73,18 +74,24 @@ /** * List of DsTableEntries. * SNMP dsTable contains the list of Directory Servers */ private Hashtable<ObjectName, DsEntry> dsTableEntries = new Hashtable<ObjectName, DsEntry>(); /** * List of DsIntTableEntries. * List of DsApplIfOpsTableEntries. * SNMP dsAppIfOpsTable provides summary statistics on the accesses * operations and errors for each application protocol interface * of a Directory Server */ private Hashtable<ObjectName, DsEntry> dsApplIfOpsTableEntries = new Hashtable<ObjectName, DsEntry>(); /** * List of DsIntTableEntries. * SNMP dsIntTable provides some useful information on the * interactions of the monitored DS with peer DS */ private Hashtable<ObjectName, DsEntry> dsIntTableEntries = new Hashtable<ObjectName, DsEntry>(); @@ -246,7 +253,7 @@ DsTableEntryImpl entry = new DsTableEntryImpl( this.mib, this.server, this.applIndex); // if the entry alreday exists nothing to do // if the entry already exists nothing to do if ((this.dsTableEntries.containsKey(entry.getObjectName())) || (entry == null)) { return true; opends/src/snmp/src/org/opends/server/snmp/SNMPMonitor.java
@@ -23,6 +23,7 @@ * * * Copyright 2008 Sun Microsystems, Inc. * Portions Copyright 2012 ForgeRock Inc. */ package org.opends.server.snmp; @@ -112,7 +113,7 @@ /** * Gets the Connection Handlers Statistics MBean. * @return the Set of Connection Handlers Statistics. * If Statistics do not exixist then an empty Set is returned * If Statistics do not exist then an empty Set is returned */ public Set<ObjectName> getConnectionHandlersStatistics() { Set<ObjectName> results = new HashSet<ObjectName>(); @@ -180,7 +181,8 @@ for (Iterator iter = monitorObjects.iterator(); iter.hasNext();) { ObjectName name = (ObjectName) iter.next(); if ((name.getCanonicalName().contains("Connection_Handler")) && (!(name.getCanonicalName().endsWith("_Statistics")))) { (!(name.getCanonicalName().endsWith("_Statistics"))) && (name.getKeyProperty("Rdn3") == null)) { results.add(name); } } @@ -197,8 +199,8 @@ * Returns the ObjectName of the Statistics Connection Handler name. * corresponding to the Connection Handler name * @param connectionHandlerName The connection handler name * @return the ObjectName of the statistics ObjectName, null if the statistics * could not be found * @return the ObjectName of the statistics ObjectName, * null if the statistics could not be found */ public ObjectName getConnectionHandlerStatistics( ObjectName connectionHandlerName) {