Package org.apache.qpid.management.common.mbeans

Examples of org.apache.qpid.management.common.mbeans.ServerInformation


    }

    public void testDenyAllIsCatchAllRule() throws Exception
    {
        //try a broker-level method
        ServerInformation info = _jmx.getServerInformation();
        try
        {
            info.resetStatistics();
            fail("Exception not thrown");
        }
        catch (SecurityException e)
        {
            assertEquals("Cause message incorrect", "Permission denied: UPDATE resetStatistics", e.getMessage());
View Full Code Here


        writeACLFile("ACL ALLOW ALL ALL");
    }

    public void testAllowAll() throws Exception
    {
        ServerInformation info = _jmx.getServerInformation();
        info.getBuildVersion(); // getter - requires ACCESS
        info.resetStatistics(); // setter - requires UPDATE
        // PASS
    }
View Full Code Here

                     "ACL DENY admin UPDATE METHOD component='ServerInformation' name='resetStatistics'");
    }

    public void testServerInformationUpdateDenied() throws Exception
    {
        ServerInformation info = _jmx.getServerInformation();
        try
        {
            info.resetStatistics();
            fail("Exception not thrown");
        }
        catch (SecurityException e)
        {
            assertEquals("Cause message incorrect", "Permission denied: UPDATE resetStatistics", e.getMessage());
View Full Code Here

                     "ACL ALLOW-LOG admin ACCESS METHOD component='ServerInformation' name='getManagementApiMajorVersion'");
    }

    public void testServerInformationAccessGranted() throws Exception
    {
        ServerInformation info = _jmx.getServerInformation();
        info.getManagementApiMajorVersion();

        try
        {
            info.getManagementApiMinorVersion();
            fail("Exception not thrown");
        }
        catch (SecurityException e)
        {
            assertEquals("Cause message incorrect", "Permission denied: ACCESS getManagementApiMinorVersion", e.getMessage());
View Full Code Here

                     "ACL ALLOW admin UPDATE METHOD component='ServerInformation' name='resetStatistics'");
    }

    public void testServerInformationUpdateMethodPermission() throws Exception
    {
        ServerInformation info = _jmx.getServerInformation();
        info.resetStatistics();
        // PASS
    }
View Full Code Here

    }

    public void testServerInformationAllMethodPermissions() throws Exception
    {
        //try an update method
        ServerInformation info = _jmx.getServerInformation();
        info.resetStatistics();
        // PASS
        //try an access method
        info.getManagementApiMinorVersion();
        // PASS
    }
View Full Code Here

        if(objectInstances.size() != 0)
        {
            for (Iterator<ObjectName> itr = objectInstances.iterator(); itr.hasNext();)
            {
                ObjectName instance = (ObjectName)itr.next();
                ServerInformation simb = (ServerInformation)
                                         MBeanServerInvocationHandler.newProxyInstance(mbsc,
                                                     instance, ServerInformation.class, false);

                    int major = simb.getManagementApiMajorVersion();
                    int minor = simb.getManagementApiMinorVersion();
                   
                    serverRegistry.setManagementApiVersion(new ApiVersion(major, minor));
            }
           
            return;
View Full Code Here

    }

    public void testDenyAllIsDefault() throws Exception
    {
        //try a broker-level method
        ServerInformation info = _jmx.getServerInformation();
        try
        {
            info.resetStatistics();
            fail("Exception not thrown");
        }
        catch (SecurityException e)
        {
            assertEquals("Cause message incorrect", "Permission denied: Update resetStatistics", e.getMessage());
View Full Code Here

        writeACLFile(null, "ACL ALLOW ALL ALL");
    }

    public void testAllowAll() throws Exception
    {
        ServerInformation info = _jmx.getServerInformation();
        info.getBuildVersion(); // getter - requires ACCESS
        info.resetStatistics(); // setter - requires UPDATE
        // PASS
    }
View Full Code Here

                "ACL DENY admin UPDATE METHOD component='ServerInformation' name='resetStatistics'");
    }

    public void testServerInformationUpdateDenied() throws Exception
    {
        ServerInformation info = _jmx.getServerInformation();
        try
        {
            info.resetStatistics();
            fail("Exception not thrown");
        }
        catch (SecurityException e)
        {
            assertEquals("Cause message incorrect", "Permission denied: Update resetStatistics", e.getMessage());
View Full Code Here

TOP

Related Classes of org.apache.qpid.management.common.mbeans.ServerInformation

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.