Package org.apache.qpid.qmf2.common

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


     * Factory method to create a Subscribe Event Object with timestamp of now.
     * @return the newly created Subscribe Event Object.
     */
    public QmfEvent createSubscribeEvent()
    {
        QmfEvent subscribe = new QmfEvent(_subscribeSchema);
        subscribe.setSeverity("info");
        subscribe.setValue("args", Collections.EMPTY_MAP);
        subscribe.setValue("dest", getStringValue("name"));
        subscribe.setValue("excl", _exclusive);
        subscribe.setValue("qName", _qName);
        // TODO Not sure of a way to get these for Java Broker Subscription.
        //subscribe.setValue("rhost", _connection.getName());
        //subscribe.setValue("user", getStringValue("authIdentity"));
        return subscribe;
    }
View Full Code Here


     * Factory method to create an Unsubscribe Event Object with timestamp of now.
     * @return the newly created Unsubscribe Event Object.
     */
    public QmfEvent createUnsubscribeEvent()
    {
        QmfEvent unsubscribe = new QmfEvent(_unsubscribeSchema);
        unsubscribe.setSeverity("info");
        unsubscribe.setValue("dest", getStringValue("name"));
        // TODO Not sure of a way to get these for Java Broker Subscription.
        //unsubscribe.setValue("rhost", _connection.getName());
        //unsubscribe.setValue("user", getStringValue("authIdentity"));
        return unsubscribe;
    }
View Full Code Here

     * Factory method to create a Queue Declare Event Object with timestamp of now.
     * @return the newly created Queue Declare Event Object.
     */
    public QmfEvent createQueueDeclareEvent()
    {
        QmfEvent queueDeclare = new QmfEvent(_queueDeclareSchema);
        queueDeclare.setSeverity("info");
        // TODO the _alternateExchangeName gets set some time after the Constructor - how do I get its value for
        // the queueDeclareEvent???!!!
        queueDeclare.setValue("altEx", _alternateExchangeName);
        queueDeclare.setValue("args", Collections.EMPTY_MAP); // TODO
        queueDeclare.setValue("autoDel", getBooleanValue("autoDelete"));
        queueDeclare.setValue("disp", "created");
        queueDeclare.setValue("durable", getBooleanValue("durable"));
        queueDeclare.setValue("excl", getBooleanValue("exclusive"));
        queueDeclare.setValue("qName", getStringValue("name"));
        // TODO Not sure of a way to get these for Java Broker Exchange.
        //queueDeclare.setValue("rhost", _connection.getName());
        //queueDeclare.setValue("user", getStringValue("authIdentity"));
        return queueDeclare;
    }
View Full Code Here

     * Factory method to create a Queue Delete Event Object with timestamp of now.
     * @return the newly created Queue Delete Event Object.
     */
    public QmfEvent createQueueDeleteEvent()
    {
        QmfEvent queueDelete = new QmfEvent(_queueDeleteSchema);
        queueDelete.setSeverity("info");
        queueDelete.setValue("qName", getStringValue("name"));
        // TODO Not sure of a way to get these for Java Broker Exchange.
        //queueDelete.setValue("rhost", _connection.getName());
        //queueDelete.setValue("user", getStringValue("authIdentity"));
        return queueDelete;
    }
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

                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

TOP

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

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.