Package org.apache.qpid.qmf2.common

Examples of org.apache.qpid.qmf2.common.NullQmfEventListener


            addObject(ostrich);


            System.out.println("total number of objects registered: " + _objectIndex.size());

            QmfQuery query;
            List<QmfConsoleData> results;

            System.out.println("looking up wasp object by ID");
            query = new QmfQuery(QmfQueryTarget.OBJECT, wasp.getObjectId());
            results = evaluateDataQuery(query);
            displayResults(results);

            System.out.println("\nlooking up mammal objects");
            query = new QmfQuery(QmfQueryTarget.OBJECT, new SchemaClassId("mammal"));
            results = evaluateDataQuery(query);
            displayResults(results);

            System.out.println("\nlooking up everything in package com.fadams.qmf2");
            query = new QmfQuery(QmfQueryTarget.OBJECT, new SchemaClassId("com.fadams.qmf2", null));
            results = evaluateDataQuery(query);
            displayResults(results);


            System.out.println("\nQuery for all mammals with more than two legs");
            String predicate = "['and', ['eq', '_package_name', ['quote', 'com.fadams.qmf2']], " +
                                       "['eq', '_class_name', ['quote', 'mammal']], " +
                                       "['gt', 'legs', 2]]";

            //predicate = "['eq', '_package_name', ['quote', 'com.fadams.qmf2']]";

            //predicate = "[]";

            query = new QmfQuery(QmfQueryTarget.OBJECT, predicate);
            System.out.println(query.getPredicate());

            results = evaluateDataQuery(query);
            displayResults(results);


            System.out.println("\nQuery for everything with less than four legs");
            predicate = "['lt', 'legs', 4]";

            query = new QmfQuery(QmfQueryTarget.OBJECT, predicate);
            System.out.println(query.getPredicate());

            results = evaluateDataQuery(query);
            displayResults(results);


            System.out.println("\nQuery for everything with between two and four legs");
            predicate = "['and', ['ge', 'legs', 2], " +
                                "['le', 'legs', 4]]";

            query = new QmfQuery(QmfQueryTarget.OBJECT, predicate);
            System.out.println(query.getPredicate());

            results = evaluateDataQuery(query);
            displayResults(results);


            System.out.println("\nQuery for all reptiles or birds");
            predicate = "['or', ['eq', '_class_name', ['quote', 'reptile']], " +
                               "['eq', '_class_name', ['quote', 'bird']]]";

            query = new QmfQuery(QmfQueryTarget.OBJECT, predicate);
            System.out.println(query.getPredicate());

            results = evaluateDataQuery(query);
            displayResults(results);


            System.out.println("\nQuery for everything whose name matches the regex ^h");
            predicate = "['re_match', 'name', ['quote', '^h']]";

            query = new QmfQuery(QmfQueryTarget.OBJECT, predicate);
            System.out.println(query.getPredicate());

            results = evaluateDataQuery(query);
            displayResults(results);

View Full Code Here


     * <p>
     * I <i>believe</i> that there should only be one entry in the list returned when looking up a specific chema by classId.
     */
    public List<SchemaClass> getSchema(final SchemaClassId classId)
    {
        SchemaClass schema = _schemaCache.get(classId);
        if (schema == SchemaClass.EMPTY_SCHEMA)
        {
            return Collections.emptyList();
        }
       
View Full Code Here

    }

    public void addObject(QmfAgentData object) throws QmfException
    {
        SchemaClassId classId = object.getSchemaClassId();
        SchemaClass schema = _schemaCache.get(classId);

        // Try to create an objectName using the set of property names that have been specified as idNames in the schema
        StringBuilder buf = new StringBuilder();
        if (schema != null && schema instanceof SchemaObjectClass)
        {
View Full Code Here

                {
                    List<Map> mapResults = AMQPMessage.getList(response);
                    for (Map content : mapResults)
                    {
//new SchemaClassId(content).listValues();
                        results.add(new SchemaClassId(content));
                    }
                }
                else if (AMQPMessage.isAMQPMap(response))
                {
                    // Error responses are returned as MapMessages, though they are being ignored here.
View Full Code Here

     * @param className the schema class name we're looking up objects for.
     * @return a List of QMF Objects describing that class.
     */
    public List<QmfConsoleData> getObjects(final String className)
    {
        return getObjects(new SchemaClassId(className));
    }
View Full Code Here

     * @param timeout overrides the default replyTimeout.
     * @return a List of QMF Objects describing that class.
     */
    public List<QmfConsoleData> getObjects(final String className, final int timeout)
    {
        return getObjects(new SchemaClassId(className), timeout);
    }
View Full Code Here

     * @param agentList if this parameter is supplied then the query is sent to only those Agents.
     * @return a List of QMF Objects describing that class.
     */
    public List<QmfConsoleData> getObjects(final String className, final List<Agent> agentList)
    {
        return getObjects(new SchemaClassId(className), agentList);
    }
View Full Code Here

     * @param agentList if this parameter is supplied then the query is sent to only those Agents.
     * @return a List of QMF Objects describing that class.
     */
    public List<QmfConsoleData> getObjects(final String className, final int timeout, final List<Agent> agentList)
    {
        return getObjects(new SchemaClassId(className), timeout, agentList);
    }
View Full Code Here

     * @param className the schema class name we're looking up objects for.
     * @return a List of QMF Objects describing that class
     */
    public List<QmfConsoleData> getObjects(final String packageName, final String className)
    {
        return getObjects(new SchemaClassId(packageName, className));
    }
View Full Code Here

     * @param timeout overrides the default replyTimeout.
     * @return a List of QMF Objects describing that class.
     */
    public List<QmfConsoleData> getObjects(final String packageName, final String className, final int timeout)
    {
        return getObjects(new SchemaClassId(packageName, className), timeout);
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.qmf2.common.NullQmfEventListener

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.