| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012 ForgeRock AS |
| | | * Portions Copyright 2012-2013 ForgeRock AS |
| | | * |
| | | */ |
| | | package org.opends.server.protocols.ldap; |
| | |
| | | |
| | | import static org.opends.messages.ProtocolMessages.*; |
| | | import static org.opends.server.protocols.ldap.LDAPConstants.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | |
| | | import java.util.ArrayList; |
| | | |
| | |
| | | import org.opends.server.api.MonitorProvider; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeBuilder; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValues; |
| | | import org.opends.server.types.OperationType; |
| | | |
| | | import org.opends.server.types.*; |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public ObjectClass getMonitorObjectClass() |
| | | { |
| | | return DirectoryConfig.getObjectClass(OC_MONITOR_CONNHANDLERSTATS, true); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Retrieves a set of attributes containing monitor data that should |
| | |
| | | |
| | | |
| | | // Construct the list of attributes to return. |
| | | /* TODO : the attribute names should be constant (in ServerConstants.java |
| | | * and associated with their objectclass |
| | | * OC_MONITOR_CONNHANDLERSTATS |
| | | */ |
| | | attrs.add(createAttribute("connectionsEstablished", String |
| | | .valueOf(tmpConnectionsEstablished))); |
| | | attrs.add(createAttribute("connectionsClosed", String |
| | | .valueOf(tmpConnectionsClosed))); |
| | | attrs |
| | | .add(createAttribute("bytesRead", String.valueOf(tmpBytesRead))); |
| | | attrs.add(createAttribute("bytesRead", String |
| | | .valueOf(tmpBytesRead))); |
| | | attrs.add(createAttribute("bytesWritten", String |
| | | .valueOf(tmpBytesWritten))); |
| | | attrs.add(createAttribute("ldapMessagesRead", String |
| | |
| | | attrs.add(createAttribute("searchRequests", String |
| | | .valueOf(tmpSearchRequests))); |
| | | attrs.add(createAttribute("searchOneRequests", String |
| | | .valueOf(tmpSearchOneRequests))); |
| | | .valueOf(tmpSearchOneRequests))); |
| | | attrs.add(createAttribute("searchSubRequests", String |
| | | .valueOf(tmpSearchSubRequests))); |
| | | .valueOf(tmpSearchSubRequests))); |
| | | attrs.add(createAttribute("searchResultEntries", String |
| | | .valueOf(tmpSearchEntries))); |
| | | attrs.add(createAttribute("searchResultReferences", String |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Clears any statistical information collected to this point. |
| | | */ |