Examples of MBeanPermission


Examples of javax.management.MBeanPermission

         ObjectName name = (ObjectName)i.next();
         try
         {
            MBeanMetaData metadata = findMBeanMetaData(name);
            String className = metadata.info.getClassName();
            sm.checkPermission(new MBeanPermission(className, "-", name, instances ? "queryMBeans" : "queryNames"));
            set.add(name);
         }
         catch (InstanceNotFoundException ignored)
         {
            // A concurrent thread removed this MBean, continue
View Full Code Here

Examples of javax.management.MBeanPermission

   public ClassLoaderRepository getClassLoaderRepository()
   {
      SecurityManager sm = System.getSecurityManager();
      if (sm != null)
      {
         sm.checkPermission(new MBeanPermission("-#-[-]", "getClassLoaderRepository"));
      }

      return getModifiableClassLoaderRepository();
   }
View Full Code Here

Examples of javax.management.MBeanPermission

      {
         name = secureObjectName(name);

         if (name == null)
         {
            sm.checkPermission(new MBeanPermission("-#-[-]", "getClassLoader"));
         }
         else
         {
            MBeanMetaData metadata = findMBeanMetaData(name);
            sm.checkPermission(new MBeanPermission(metadata.getMBeanInfo().getClassName(), "-", name, "getClassLoader"));
         }
      }

      return getClassLoaderImpl(name);
   }
View Full Code Here

Examples of javax.management.MBeanPermission

      // If name is null, I get InstanceNotFoundException
      MBeanMetaData metadata = findMBeanMetaData(name);

      if (sm != null)
      {
         sm.checkPermission(new MBeanPermission(metadata.getMBeanInfo().getClassName(), "-", name, "getClassLoaderFor"));
      }

      return metadata.getMBean().getClass().getClassLoader();
   }
View Full Code Here

Examples of javax.management.MBeanPermission

      SecurityManager sm = System.getSecurityManager();
      if (sm != null)
      {
         // Must check if the user has the right to call this method, regardless of the attributes
         sm.checkPermission(new MBeanPermission(metadata.getMBeanInfo().getClassName(), "-", objectName, "getAttribute"));
      }

      return getHeadInterceptor().getAttributes(metadata, attributes);
   }
View Full Code Here

Examples of javax.management.MBeanPermission

      SecurityManager sm = System.getSecurityManager();
      if (sm != null)
      {
         // Must check if the user has the right to call this method, regardless of the attributes
         sm.checkPermission(new MBeanPermission(metadata.getMBeanInfo().getClassName(), "-", objectName, "setAttribute"));
      }

      return getHeadInterceptor().setAttributes(metadata, attributes);
   }
View Full Code Here

Examples of javax.management.MBeanPermission

   public String[] getDomains()
   {
      SecurityManager sm = System.getSecurityManager();
      if (sm != null)
      {
         sm.checkPermission(new MBeanPermission(null, null, null, "getDomains"));
      }
      Set keys;
      synchronized (domains)
      {
         keys = new HashSet(domains.keySet());
      }
      if (sm != null)
      {
         for (Iterator i = keys.iterator(); i.hasNext();)
         {
            String domain = (String)i.next();
            try
            {
               ObjectName name = new ObjectName(domain, "x", "x");
               sm.checkPermission(new MBeanPermission(null, null, name, "getDomains"));
            }
            catch (SecurityException e)
            {
               i.remove();
               continue;
View Full Code Here

Examples of javax.management.MBeanPermission

      MBeanMetaData metadata = findMBeanMetaData(objectName);

      if (sm != null)
      {
         sm.checkPermission(new MBeanPermission(metadata.getMBeanInfo().getClassName(), "-", objectName, "getObjectInstance"));
      }

      return metadata.getObjectInstance();
   }
View Full Code Here

Examples of javax.management.MBeanPermission

      String infoClassName = metadata.getMBeanInfo().getClassName();

      SecurityManager sm = System.getSecurityManager();
      if (sm != null)
      {
         sm.checkPermission(new MBeanPermission(infoClassName, "-", objectName, "isInstanceOf"));
      }
      if (className.equals(infoClassName)) return true;

      try
      {
View Full Code Here

Examples of javax.management.MBeanPermission

      if (sm != null)
      {
         patternName = secureObjectName(patternName);
         // Must check if the user has the right to call this method,
         // no matter which ObjectName has been passed.
         sm.checkPermission(new MBeanPermission("-#-[-]", "queryMBeans"));
      }

      Set match = queryObjectNames(patternName, filter, true);

      Set set = new HashSet();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.