예제 #1
0
        public void DemandVerifyAsHeldFailueTest()
        {
            SetPermissions(new MBeanPermission("NetMX.StandardMBean, NetMX", "getMBeanInfo", new ObjectName("Sample:"), MBeanPermissionAction.Invoke));
            MBeanPermission perm = new MBeanPermission("", "getMBeanInfo", new ObjectName("Sample:"), MBeanPermissionAction.Invoke);

            perm.Demand();
        }
예제 #2
0
        private static void TestPermissions(string className, string memberName, ObjectName name, MBeanPermissionAction action)
        {
            MBeanCASPermission casPerm = new MBeanCASPermission(className, memberName, name, action);

            casPerm.Demand();
            MBeanPermission perm = new MBeanPermission(className, memberName, name, action);

            perm.Demand();
        }
예제 #3
0
        public void DemandTest()
        {
            SetPermissions(new MBeanPermission("NetMX.StandardMBean, NetMX", "getMBeanInfo", new ObjectName("Sample:"), MBeanPermissionAction.Invoke));
             MBeanPermission perm = new MBeanPermission("NetMX.StandardMBean, NetMX", "getMBeanInfo", new ObjectName("Sample:"), MBeanPermissionAction.Invoke);
             perm.Demand();

             perm = new MBeanPermission(null, "getMBeanInfo", new ObjectName("Sample:"), MBeanPermissionAction.Invoke);
             perm.Demand();

             perm = new MBeanPermission("NetMX.StandardMBean, NetMX", null, new ObjectName("Sample:"), MBeanPermissionAction.Invoke);
             perm.Demand();

             perm = new MBeanPermission("NetMX.StandardMBean, NetMX", "getMBeanInfo", null, MBeanPermissionAction.Invoke);
             perm.Demand();
        }
예제 #4
0
 private static void TestPermissions(string className, string memberName, ObjectName name, MBeanPermissionAction action)
 {
     MBeanCASPermission casPerm = new MBeanCASPermission(className, memberName, name, action);
     casPerm.Demand();
     MBeanPermission perm = new MBeanPermission(className, memberName, name, action);
     perm.Demand();
 }