Package org.apache.qpid.qmf2.common

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


                System.out.println("No broker QmfConsoleData returned");
                System.exit(1);
            }

            QmfConsoleData broker = brokers.get(0);
            QmfData arguments = new QmfData();
            arguments.setValue("type", "queue");

            for (int i = 0; i < 300; i++)
            {
                arguments.setValue("name", "test " + i);

                try
                {
                    broker.invokeMethod("create", arguments);
                }
View Full Code Here


        if (_altExchange != null)
        {
            properties.put("alternate-exchange", _altExchange);
        }

        QmfData arguments = new QmfData();
        arguments.setValue("type", "exchange");
        arguments.setValue("name", args[1]);
        arguments.setValue("properties", properties);

        try
        {
            _broker.invokeMethod("create", arguments);
        }
View Full Code Here

        if (_flowResumeCount > 0)
        {
            properties.put(FLOW_RESUME_COUNT, _flowResumeCount);
        }

        QmfData arguments = new QmfData();
        arguments.setValue("type", "queue");
        arguments.setValue("name", args[0]);
        arguments.setValue("properties", properties);

        try
        {
            _broker.invokeMethod("create", arguments);
        }
View Full Code Here

                        _agent.methodResponse(methodName, item.getHandle(), inArgs, null);
                    }
                    else if (methodName.equals("event"))
                    {
                        System.out.println("Invoked event method");
                        QmfEvent event = new QmfEvent(_eventSchema);
                        event.setSeverity((int)inArgs.getLongValue("severity"));
                        event.setValue("text", inArgs.getStringValue("text"));
                        _agent.raiseEvent(event);
                        _agent.methodResponse(methodName, item.getHandle(), null, null);
                    }
                    else if (methodName.equals("fail"))
                    {
View Full Code Here

    public void onEvent(final WorkItem wi)
    {
        if (wi instanceof EventReceivedWorkItem)
        {
            EventReceivedWorkItem item = (EventReceivedWorkItem)wi;
            QmfEvent event = item.getEvent();
            String className = event.getSchemaClassId().getClassName();
            if (className.equals("subscribe"))
            {
                readWhitelist();
                String queueName = event.getStringValue("qName");
                String address = event.getStringValue("rhost");
                String timestamp = new Date(event.getTimestamp()/1000000l).toString();
                validateQueue(queueName, address, timestamp);
            }
        }
        else if (wi instanceof AgentRestartedWorkItem)
        {
View Full Code Here

    {
        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

TOP

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

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.