mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

floblanc
06.26.2008 78d0902c64346883885504cfc43ec335951429c2
opends/src/server/org/opends/server/core/networkgroups/NetworkGroup.java
@@ -36,6 +36,7 @@
import org.opends.server.api.ClientConnection;
import org.opends.server.core.*;
import org.opends.server.protocols.ldap.LDAPMessage;
import org.opends.server.types.AuthenticationType;
import org.opends.server.types.DN;
import org.opends.server.types.DirectoryException;
@@ -133,6 +134,9 @@
  // The network group request filtering policy
  private RequestFilteringPolicy requestFilteringPolicy = null;
  // The statistics
  private NetworkGroupStatistics stats;
  /**
   * Creates a new instance of the network group.
   *
@@ -147,6 +151,9 @@
    isInternalNetworkGroup = INTERNAL_NETWORK_GROUP_NAME.equals(networkGroupID);
    isAdminNetworkGroup    = ADMIN_NETWORK_GROUP_NAME.equals(networkGroupID);
    isDefaultNetworkGroup  = DEFAULT_NETWORK_GROUP_NAME.equals(networkGroupID);
    stats = new NetworkGroupStatistics(this,
        networkGroupID + " Network Group Statistics");
  }
@@ -1108,4 +1115,36 @@
      namingContexts = new NetworkGroupNamingContexts();
    }
  }
  /**
   * Retrieves the statistics associated to the request filtering policy.
   *
   * @return the statistics associated to the request filtering policy
   */
  public RequestFilteringPolicyStat getRequestFilteringPolicyStat() {
    if (requestFilteringPolicy != null) {
      return requestFilteringPolicy.getStat();
    }
    return null;
  }
  /**
   * Retrieves the statistics associated to the resource limits.
   *
   * @return the statistics associated to the resource limits
   */
  public ResourceLimitsStat getResourceLimitStat() {
    if (resourceLimits != null) {
      return resourceLimits.getStat();
    }
    return null;
  }
  /**
   * Updates the operations statistics.
   * @param message The LDAP message being processed
   */
  public void updateMessageRead(LDAPMessage message) {
    stats.updateMessageRead(message);
  }
}