8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Copyright (c) 2009 Sun Microsystems Inc. All Rights Reserved
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * The contents of this file are subject to the terms
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * of the Common Development and Distribution License
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * (the License). You may not use this file except in
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * compliance with the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * You can obtain a copy of the License at
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * https://opensso.dev.java.net/public/CDDLv1.0.html or
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * See the License for the specific language governing
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * permission and limitations under the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * When distributing Covered Code, include this CDDL
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Header Notice in each file and include the License file
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * If applicable, add the following below the CDDL Header,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * with the fields enclosed by brackets [] replaced by
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * your own identifying information:
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * "Portions Copyrighted [year] [name of copyright owner]"
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * $Id: SsoServerEntitlementPolicyStatsEntryImpl.java,v 1.1 2009/10/20 23:55:27 bigfatrat Exp $
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Portions Copyrighted 2011 ForgeRock AS
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport com.sun.identity.entitlement.opensso.OpenSSOIndexStore;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport com.sun.management.snmp.SnmpStatusException;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * This class extends the "SsoServerEntitlementPolicyStatsEntry" class.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterpublic class SsoServerEntitlementPolicyStatsEntryImpl extends
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Constructor
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public SsoServerEntitlementPolicyStatsEntryImpl(SnmpMib myMib) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster createSsoServerEntitlementPolicyStatsEntryObjectName (
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster String classModule = "SsoServerEntitlementPolicyStatsEntryImpl." +
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster "createSsoServerEntitlementPolicyStatsEntryObjectName: ";
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster String prfx = "ssoServerEntitlementPolicyStatsEntry.";
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster "\n SsoServerRealmIndex = " + SsoServerRealmIndex +
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster "\n StatsName = EntitlementPolicy");
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster Agent.getEscRealmNameFromIndex(SsoServerRealmIndex);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster "/ssoServerEntitlementPolicyStatsTable:" +
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster "," + prfx + "StatsEntryName=EntitlementPolicy";
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // is the object name sufficiently unique?
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Getter for the "EntitlementPolicyCaches" variable.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public Integer getEntitlementPolicyCaches() throws SnmpStatusException {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster String classMethod = "SsoServerEntitlementPolicyStatsEntryImpl." +
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster "getEntitlementPolicyCaches: ";
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster int i = OpenSSOIndexStore.getNumCachedPolicies(
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster StringBuilder sb = new StringBuilder(classMethod);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster sb.append("for realm ").append(EntitlementPolicyStatsRealmName);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Getter for the "EntitlementReferralCaches" variable.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public Integer getEntitlementReferralCaches() throws SnmpStatusException {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster String classMethod = "SsoServerEntitlementPolicyStatsEntryImpl." +
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster "getEntitlementReferralCaches: ";
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster int i = OpenSSOIndexStore.getNumCachedReferrals(
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster EntitlementReferralCaches = Integer.valueOf(i);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster StringBuilder sb = new StringBuilder(classMethod);