Examples of AllObjects


Examples of org.apache.qpid.commands.objects.AllObjects

     * Retrive {@link ServerInformation} JMX MBean.
     */
    public ServerInformation getServerInformation()
    {
        // Get the name of the test manager
        AllObjects allObject = new AllObjects(_mbsc);
        allObject.querystring = "org.apache.qpid:type=ServerInformation,name=ServerInformation,*";

        Set<ObjectName> objectNames = allObject.returnObjects();

        TestCase.assertNotNull("Null ObjectName Set returned", objectNames);
        TestCase.assertEquals("Incorrect number of objects returned", 1, objectNames.size());

        // We have verified we have only one value in objectNames so return it
View Full Code Here

Examples of org.apache.qpid.commands.objects.AllObjects

     * Retrive all {@link ManagedConnection} objects.
     */
    public List<ManagedConnection> getAllManagedConnections()
    {
        // Get the name of the test manager
        AllObjects allObject = new AllObjects(_mbsc);
        allObject.querystring = "org.apache.qpid:type=VirtualHost.Connection,VirtualHost=*,name=*";

        Set<ObjectName> objectNames = allObject.returnObjects();

        TestCase.assertNotNull("Null ObjectName Set returned", objectNames);

        return getManagedObjectList(ManagedConnection.class, objectNames);
    }
View Full Code Here

Examples of org.apache.qpid.commands.objects.AllObjects

     * Retrive all {@link ManagedConnection} objects for a particular virtual host.
     */
    public List<ManagedConnection> getManagedConnections(String vhost)
    {
        // Get the name of the test manager
        AllObjects allObject = new AllObjects(_mbsc);
        allObject.querystring = "org.apache.qpid:type=VirtualHost.Connection,VirtualHost=" + ObjectName.quote(vhost) + ",name=*";

        Set<ObjectName> objectNames = allObject.returnObjects();

        TestCase.assertNotNull("Null ObjectName Set returned", objectNames);

        return getManagedObjectList(ManagedConnection.class, objectNames);
    }
View Full Code Here

Examples of org.apache.qpid.commands.objects.AllObjects

     */
    @SuppressWarnings("static-access")
    public ObjectName getVirtualHostManagerObjectName(String vhostName)
    {
        // Get the name of the test manager
        AllObjects allObject = new AllObjects(_mbsc);
        allObject.querystring = "org.apache.qpid:type=VirtualHost.VirtualHostManager,VirtualHost="
                                + ObjectName.quote(vhostName) + ",*";

        Set<ObjectName> objectNames = allObject.returnObjects();

        _test.assertNotNull("Null ObjectName Set returned", objectNames);
        _test.assertEquals("Incorrect number test vhosts returned", 1, objectNames.size());

        // We have verified we have only one value in objectNames so return it
View Full Code Here

Examples of org.apache.qpid.commands.objects.AllObjects

     */
    @SuppressWarnings("static-access")
    public ObjectName getQueueObjectName(String virtualHostName, String queue)
    {
        // Get the name of the test manager
        AllObjects allObject = new AllObjects(_mbsc);
        allObject.querystring = "org.apache.qpid:type=VirtualHost.Queue,VirtualHost="
                                 + ObjectName.quote(virtualHostName) + ",name="
                                 + ObjectName.quote(queue) + ",*";

        Set<ObjectName> objectNames = allObject.returnObjects();

        _test.assertNotNull("Null ObjectName Set returned", objectNames);
        _test.assertEquals("Incorrect number of queues with name '" + allObject.querystring +
                           "' returned", 1, objectNames.size());

View Full Code Here

Examples of org.apache.qpid.commands.objects.AllObjects

     */
    @SuppressWarnings("static-access")
    public ObjectName getExchangeObjectName(String virtualHostName, String exchange)
    {
        // Get the name of the test manager
        AllObjects allObject = new AllObjects(_mbsc);
        allObject.querystring = "org.apache.qpid:type=VirtualHost.Exchange,VirtualHost="
                                + ObjectName.quote(virtualHostName) + ",name="
                                + ObjectName.quote(exchange) + ",*";

        Set<ObjectName> objectNames = allObject.returnObjects();

        _test.assertNotNull("Null ObjectName Set returned", objectNames);
        _test.assertEquals("Incorrect number of exchange with name '" + exchange + "' returned", 1, objectNames.size());

        // We have verified we have only one value in objectNames so return it
View Full Code Here

Examples of org.apache.qpid.commands.objects.AllObjects

    }

    @SuppressWarnings("static-access")
    public <T> T getManagedObject(Class<T> managedClass, String queryString)
    {
        AllObjects allObject = new AllObjects(_mbsc);
        allObject.querystring = queryString;

        Set<ObjectName> objectNames = allObject.returnObjects();

        _test.assertNotNull("Null ObjectName Set returned", objectNames);
        _test.assertEquals("More than one " + managedClass + " returned", 1, objectNames.size());

        ObjectName objectName = objectNames.iterator().next();
View Full Code Here

Examples of org.apache.qpid.commands.objects.AllObjects

     */
    @SuppressWarnings("static-access")
    public ObjectName getVirtualHostManagerObjectName(String vhostName)
    {
        // Get the name of the test manager
        AllObjects allObject = new AllObjects(_mbsc);
        allObject.querystring = "org.apache.qpid:type=VirtualHost.VirtualHostManager,VirtualHost="
                                + ObjectName.quote(vhostName) + ",*";

        Set<ObjectName> objectNames = allObject.returnObjects();

        _test.assertNotNull("Null ObjectName Set returned", objectNames);
        _test.assertEquals("Incorrect number test vhosts returned", 1, objectNames.size());

        // We have verified we have only one value in objectNames so return it
View Full Code Here

Examples of org.apache.qpid.commands.objects.AllObjects

     */
    @SuppressWarnings("static-access")
    public ObjectName getQueueObjectName(String virtualHostName, String queue)
    {
        // Get the name of the test manager
        AllObjects allObject = new AllObjects(_mbsc);
        allObject.querystring = "org.apache.qpid:type=VirtualHost.Queue,VirtualHost="
                                 + ObjectName.quote(virtualHostName) + ",name="
                                 + ObjectName.quote(queue) + ",*";

        Set<ObjectName> objectNames = allObject.returnObjects();

        _test.assertNotNull("Null ObjectName Set returned", objectNames);
        _test.assertEquals("Incorrect number of queues with name '" + allObject.querystring +
                           "' returned", 1, objectNames.size());

View Full Code Here

Examples of org.apache.qpid.commands.objects.AllObjects

     */
    @SuppressWarnings("static-access")
    public ObjectName getExchangeObjectName(String virtualHostName, String exchange)
    {
        // Get the name of the test manager
        AllObjects allObject = new AllObjects(_mbsc);
        allObject.querystring = "org.apache.qpid:type=VirtualHost.Exchange,VirtualHost="
                                + ObjectName.quote(virtualHostName) + ",name="
                                + ObjectName.quote(exchange) + ",*";

        Set<ObjectName> objectNames = allObject.returnObjects();

        _test.assertNotNull("Null ObjectName Set returned", objectNames);
        _test.assertEquals("Incorrect number of exchange with name '" + exchange + "' returned", 1, objectNames.size());

        // We have verified we have only one value in objectNames so return it
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.