Package javax.management

Examples of javax.management.MBeanPermission


      shouldBeEqual(mbp4, mbp5);
   }

   public void testValidMBeanPermissionOne() throws Exception
   {
      MBeanPermission mbp1 = new MBeanPermission("[d:k=v]", "invoke");
      MBeanPermission mbp2 = new MBeanPermission("*[d:k=v]", "invoke");
      MBeanPermission mbp3 = new MBeanPermission("*#*[d:k=v]", "invoke");

      shouldBeEqual(mbp1, mbp2);
      shouldBeEqual(mbp2, mbp3);
   }
View Full Code Here


      shouldBeEqual(mbp2, mbp3);
   }

   public void testValidMBeanPermissionTwo() throws Exception
   {
      MBeanPermission mbp1 = new MBeanPermission("com.package.MyClass", "getAttribute");
      MBeanPermission mbp2 = new MBeanPermission("com.package.MyClass#*", "getAttribute");
      MBeanPermission mbp3 = new MBeanPermission("com.package.MyClass#*[*:*]", "getAttribute");

      shouldBeEqual(mbp1, mbp2);
      shouldBeEqual(mbp2, mbp3);
   }
View Full Code Here

      shouldBeEqual(mbp2, mbp3);
   }

   public void testValidMBeanPermissionThree() throws Exception
   {
      MBeanPermission mbp1 = new MBeanPermission("com.package.MyClass[d:k=v]", "setAttribute");
      MBeanPermission mbp2 = new MBeanPermission("com.package.MyClass#*[d:k=v]", "setAttribute");

      shouldBeEqual(mbp1, mbp2);
   }
View Full Code Here

      shouldBeEqual(mbp1, mbp2);
   }

   public void testValidMBeanPermissionFour() throws Exception
   {
      MBeanPermission mbp1 = new MBeanPermission("#Name[d:k=v]", "isInstanceOf");
      MBeanPermission mbp2 = new MBeanPermission("*#Name[d:k=v]", "isInstanceOf");

      shouldBeEqual(mbp1, mbp2);
   }
View Full Code Here

      shouldBeEqual(mbp1, mbp2);
   }

   public void testValidMBeanPermissionFive() throws Exception
   {
      MBeanPermission mbp1 = new MBeanPermission("-", "getMBeanInfo");
      MBeanPermission mbp2 = new MBeanPermission("-#*[*:*]", "getMBeanInfo");

      shouldBeEqual(mbp1, mbp2);
   }
View Full Code Here

      shouldBeEqual(mbp1, mbp2);
   }

   public void testValidMBeanPermissionSix() throws Exception
   {
      MBeanPermission mbp1 = new MBeanPermission("-#-", "getMBeanInfo");
      MBeanPermission mbp2 = new MBeanPermission("-#-[*:*]", "getMBeanInfo");

      shouldBeEqual(mbp1, mbp2);
   }
View Full Code Here

      shouldBeEqual(mbp1, mbp2);
   }

   public void testValidMBeanPermissionSeven() throws Exception
   {
      MBeanPermission mbp1 = new MBeanPermission("-#-[-]", "getMBeanInfo");
   }
View Full Code Here

      MBeanPermission mbp1 = new MBeanPermission("-#-[-]", "getMBeanInfo");
   }

   public void testValidMBeanPermissionEight() throws Exception
   {
      MBeanPermission mbp1 = new MBeanPermission("com.package.MyClass#Attr[d:k=v]", "*");
      MBeanPermission mbp2 = new MBeanPermission("com.package.MyClass#Attr[d:k=v]", "invoke,*");

      shouldBeEqual(mbp1, mbp2);
   }
View Full Code Here

      shouldBeEqual(mbp1, mbp2);
   }

   public void testValidMBeanPermissionNine() throws Exception
   {
      new MBeanPermission("*[d:k=v]", "addNotificationListener, *");
      new MBeanPermission("*[d:k1=v1,k2=v2]", "removeNotificationListener, *");
      new MBeanPermission("mx4j.*", "addNotificationListener, removeNotificationListener");
      new MBeanPermission("mx4j.Foo#*", "addNotificationListener, removeNotificationListener");
      new MBeanPermission("mx4j.Foo$Inner#*", "addNotificationListener, removeNotificationListener");
      new MBeanPermission("mx4j.Foo#*[*:*]", "addNotificationListener, removeNotificationListener");
      new MBeanPermission("mx4j.Foo$Inner#*[*:*]", "addNotificationListener, removeNotificationListener");
      new MBeanPermission("mx4j.Foo#Bar[d:k=v]", "addNotificationListener, removeNotificationListener");
      new MBeanPermission("mx4j.Foo$Inner#Bar[d:k=v]", "addNotificationListener, removeNotificationListener");
   }
View Full Code Here

      new MBeanPermission("mx4j.Foo$Inner#Bar[d:k=v]", "addNotificationListener, removeNotificationListener");
   }

   public void testMBeanPermissionWildcardAlwaysImplies() throws Exception
   {
      MBeanPermission wild = new MBeanPermission("*", "*");
      shouldImply(wild, wild);
      shouldImply(new MBeanPermission("*[*:*]", "*"), wild);
      shouldImply(wild, new MBeanPermission("*[*:*]", "*"));
      shouldImply(new MBeanPermission("*#*[*:*]", "*"), wild);
      shouldImply(wild, new MBeanPermission("*#*[*:*]", "*"));

      implies(wild, new MBeanPermission("com.*", "*"));
      shouldImply(wild, new MBeanPermission("com.package.MyClass", "*"));
      shouldImply(wild, new MBeanPermission("com.package.MyClass#Attribute", "*"));
      shouldImply(wild, new MBeanPermission("com.package.MyClass#Attribute[d:k=v]", "*"));
      shouldImply(wild, new MBeanPermission("com.package.MyClass#Attribute[d:k=v]", "getObjectInstance"));
      shouldImply(wild, new MBeanPermission("-#-[-]", "*"));
   }
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.