コード例 #1
0
 public void RegisterMBeanPermissionTest()
 {
     DoPermissionTest(
        null,
        delegate()
        {
            IMBeanServer server = new MBeanServer();
            server.RegisterMBean(new Dummy(), new ObjectName("dummy:"));
        }, null, null, MBeanPermissionAction.RegisterMBean, MBeanPermissionAction.UnregisterMBean);
 }
コード例 #2
0
 public void GetAttributePermissionTest()
 {
     IMBeanServer server = null;
     DoPermissionTest(
        delegate()
        {
            server = new MBeanServer();
            server.RegisterMBean(new Dummy(), new ObjectName("dummy:"));
        },
        delegate()
        {
            object o = server.GetAttribute(new ObjectName("dummy:"), "IntValue");
        }, "IntValue", "DoSomething", MBeanPermissionAction.GetAttribute, MBeanPermissionAction.SetAttribute);
 }
コード例 #3
0
 public void RegisterMBeanSuccessTest()
 {
     IMBeanServer server = new MBeanServer();
     server.RegisterMBean(new Trusted(), new ObjectName("trusted:"));
 }
コード例 #4
0
 public void RegisterMBeanFailureTest()
 {
     IMBeanServer server = new MBeanServer();
     server.RegisterMBean(new Untrusted(), new ObjectName("trusted:"));
 }