Package org.apache.qpid.qmf2.common

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


    {
        if (wi instanceof EventReceivedWorkItem)
        {
            EventReceivedWorkItem item = (EventReceivedWorkItem)wi;
            Agent agent = item.getAgent();
            QmfEvent event = item.getEvent();

            String className = event.getSchemaClassId().getClassName();
            if (className.equals("clientConnect") ||
                className.equals("clientDisconnect"))
            {
                _stateChanged = true;
            }
View Full Code Here


        {
            return _proxy.refresh(this, objectId, replyHandle, timeout);
        }
        else
        {
            throw new QmfException("Agent.refresh() called from deactivated Agent");
        }
    }
View Full Code Here

        {
            return _proxy.invokeMethod(this, createRequest(objectId, name, inArgs), null, timeout);
        }
        else
        {
            throw new QmfException("Agent.invokeMethod() called from deactivated Agent");
        }
    }
View Full Code Here

        {
            _proxy.invokeMethod(this, createRequest(objectId, name, inArgs), replyHandle, -1);
        }
        else
        {
            throw new QmfException("Agent.invokeMethod() called from deactivated Agent");
        }
    }
View Full Code Here

    {
        if (_exception == this)
        {
            if (hasValue("error_text"))
            {
                return new QmfException(getStringValue("error_text"));
            }

            if (hasValue("message"))
            {
                return new QmfException(getStringValue("message"));
            }
        }
        return null;
    }
View Full Code Here

        ObjectId addr = new ObjectId("test"/*name*/, objectName, 0/*epoch*/);
        object.setObjectId(addr);

        if (_objectIndex.get(addr) != null)
        {
            throw new QmfException("Duplicate QmfAgentData Address");
        }

        _objectIndex.put(addr, object);
    }
View Full Code Here

                if (count == 10)
                {
                    System.out.println("Applying Agent Discovery Query ['eq', '_product', ['quote', 'gizmo']]");
                    System.out.println("This should disable broker Agent events but allow gizmo Agent events");
                    System.out.println("Run AgentTest to prove this");
                    QmfQuery query = new QmfQuery(QmfQueryTarget.OBJECT, "['eq', '_product', ['quote', 'gizmo']]");
                    _console.enableAgentDiscovery(query);
                }
            }
        }
        catch (QmfException qmfe)
View Full Code Here

     */
    private void createQueueSubscription()
    {
        try
        {   // This QmfQuery simply does an ID query for objects with the className "queue"
            QmfQuery query = new QmfQuery(QmfQueryTarget.OBJECT, new SchemaClassId("queue"));
            SubscribeParams params = _console.createSubscription(_broker, query, "queueStatsHandle");
            _subscriptionId = params.getSubscriptionId();
            _subscriptionDuration = params.getLifetime() - 10; // Subtract 10 as we want to refresh before it times out
            _startTime = System.currentTimeMillis();
        }
View Full Code Here

            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

TOP

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

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.