Package javax.management

Examples of javax.management.MBeanPermission


   private void checkPermission(String className, String methodName, ObjectName objectname, String action)
   {
      SecurityManager sm = System.getSecurityManager();
      if (sm != null)
      {
         sm.checkPermission(new MBeanPermission(className, methodName, objectname, action));
      }
   }
View Full Code Here


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

      return getModifiableClassLoaderRepository();
   }
View Full Code Here

      {
         name = secureObjectName(name);

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

      return getClassLoaderImpl(name);
   }
View Full Code Here

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

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

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

      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.info.getClassName(), "-", objectName, "getAttribute"));
      }

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

      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.info.getClassName(), "-", objectName, "setAttribute"));
      }

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

      MBeanMetaData metadata = findMBeanMetaData(objectName);

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

      return metadata.instance;
   }
View Full Code Here

      MBeanMetaData metadata = findMBeanMetaData(objectName);

      SecurityManager sm = System.getSecurityManager();
      if (sm != null)
      {
         sm.checkPermission(new MBeanPermission(metadata.info.getClassName(), "-", objectName, "isInstanceOf"));
      }

      try
      {
         ClassLoader loader = metadata.classloader;
View Full Code Here

      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

      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("-#-[-]", "queryNames"));
      }

      return queryObjectNames(patternName, filter, false);
   }
View Full Code Here

TOP

Related Classes of javax.management.MBeanPermission

Copyright © 2018 www.massapicom. 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.