Exemple #1
0
 private static bool CheckRoleClassNames(RoleInfo roleInfo, IEnumerable<ObjectName> objectNames, IMBeanServerConnection serverConnection)
 {
     foreach (ObjectName name in objectNames)
      {
     if (!serverConnection.IsRegistered(name))
     {
        return false;
     }
     MBeanInfo beanInfo = serverConnection.GetMBeanInfo(name);
     if (beanInfo.ClassName != roleInfo.RefMBeanClassName)
     {
        return false;
     }
      }
      return true;
 }
 public ManagedResourceRoleInfo(RoleInfo roleInfo)
 {
     accessField = "";
      if (roleInfo.Readable)
      {
     accessField += "r";
      }
      if (roleInfo.Writable)
      {
     accessField += "w";
      }
      minDegreeField = roleInfo.MinDegree;
      maxDegreeField = roleInfo.MaxDegree;
      nameField = roleInfo.Name;
      descriptionField = roleInfo.Description;
      managedResourceClassNameField = roleInfo.RefMBeanClassName;
 }
Exemple #3
0
 internal static bool ValidateRole(IList<ObjectName> value, RoleInfo info, IMBeanServerConnection serverConnection)
 {
     return info.CheckMaxDegree(value.Count) && info.CheckMinDegree(value.Count) && CheckRoleClassNames(info, value, serverConnection);
 }