Examples of ObjectId


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

        if (wi.getType() == METHOD_CALL)
        {
            MethodCallWorkItem item = (MethodCallWorkItem)wi;
            MethodCallParams methodCallParams = item.getMethodCallParams();
            String methodName = methodCallParams.getName();
            ObjectId objectId = methodCallParams.getObjectId();
            String userId = methodCallParams.getUserId();
            userId = userId.equals("") ? "anonymous" : userId;
            QmfData inArgs = methodCallParams.getArgs();
            ObjectId controlAddress = _control.getObjectId();

            System.out.println("Method Call User ID = " + userId);

            try
            {
View Full Code Here

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

            {
                System.out.println("control object found");
                QmfConsoleData control = controls.get(0);
                //control.listValues();

                ObjectId oid = control.getObjectId();
                //System.out.println("Agent Name = " + oid.getAgentName());
                //System.out.println("Agent Epoch = " + oid.getAgentEpoch());
                //System.out.println("Object Name = " + oid.getObjectName());

                System.out.println("Testing lookup of object by ObjectId");
                controls = _console.getObjects(oid);

                if (controls.size() == 0)
                {
                    System.out.println("No objects returned from ObjectId lookup: AgentTestConsole failed");
                    System.exit(1);
                }

                System.out.println("MethodCount = " + control.getLongValue("methodCount"));
                QmfData inArgs;
                QmfData outArgs;
                MethodResult results;

/*
                System.out.println("Testing invokeMethod(toString, args) - method called directly on Agent");
                results = _gizmo.invokeMethod("toString", null);
                System.out.println("gizmo.toString() = " + results.getArguments().getStringValue("string"));
*/

                // ********** Invoke create_child nethod **********
                System.out.println("Testing invokeMethod(create_child, args)");
                inArgs = new QmfData();
                inArgs.setValue("name", "child 1");

                results = control.invokeMethod("create_child", inArgs);
                if (!results.succeeded())
                {
                    System.out.println("create_child returned an exception object");
                    System.exit(1);
                }

                if (!results.hasValue("childAddr"))
                {
                    System.out.println("create_child returned an unexpected value");
                    System.exit(1);
                }

                ObjectId childId = results.getRefValue("childAddr");       
                System.out.println("childId = " + childId);
                System.out.println("childAddr subtype = " + results.getSubtype("childAddr"));
                QmfConsoleData child1 = _console.getObjects(childId).get(0);
                System.out.println("child1 name = " + child1.getStringValue("name"));

View Full Code Here

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

        if (wi.getType() == OBJECT_UPDATE)
        {
            ObjectUpdateWorkItem item = (ObjectUpdateWorkItem)wi;
            QmfConsoleData object = item.getQmfConsoleData();
            ObjectId objectId = object.getObjectId();
            String correlationId = item.getHandle().getCorrelationId();
            System.out.println("correlationId = " + correlationId);
            System.out.println("objectId = " + objectId);
            System.out.println("MethodCount = " + object.getLongValue("methodCount"));
        }
View Full Code Here

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

        if (wi.getType() == OBJECT_UPDATE)
        {
            ObjectUpdateWorkItem item = (ObjectUpdateWorkItem)wi;
            QmfConsoleData object = item.getQmfConsoleData();
            ObjectId objectId = object.getObjectId();
            String correlationId = item.getHandle().getCorrelationId();
            System.out.println("correlationId = " + correlationId);
            System.out.println("objectId = " + objectId);
            System.out.println("MethodCount = " + object.getLongValue("methodCount"));
        }
View Full Code Here

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

        if (wi.getType() == OBJECT_UPDATE)
        {
            ObjectUpdateWorkItem item = (ObjectUpdateWorkItem)wi;
            QmfConsoleData object = item.getQmfConsoleData();
            ObjectId objectId = object.getObjectId();
            String correlationId = item.getHandle().getCorrelationId();
            System.out.println("correlationId = " + correlationId);
            System.out.println("objectId = " + objectId);
            System.out.println("MethodCount = " + object.getLongValue("methodCount"));
        }
View Full Code Here

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

        // ObjectId needs to be set here in Exchange because the QMF2 version of qpid-config uses a hardcoded
        // _object_name as below in the _object_id that it sets in the getExchange() call and in exchangeRef.
        // It *shouldn't* do this and should really use the _object_id of the exchange object returned by
        // getObjects("exchange"), but it does. The following line causes the Agent to use the explicit
        // ObjectId below rather than constructing its own, which fixes the qpid-config issue.
        setObjectId(new ObjectId("", "org.apache.qpid.broker:exchange:" + _name, 0));
    }
View Full Code Here

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

        // It *shouldn't* do this and should really use the _object_id of the broker object returned by
        // getObjects("broker"), but it does. The following line causes the Agent to use the explicit
        // ObjectId below rather than constructing its own, which fixes the qpid-config issue.
        // Note we use "amqp-broker" in the ObjectId to be compatible with qpid-config but we set the actual
        // name to "amqp-java-broker" as it's useful to be able to distinguish between C++ and Java Brokers.
        setObjectId(new ObjectId("", "org.apache.qpid.broker:broker:amqp-broker", 0));
    }
View Full Code Here

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

                            // and get its associated org.apache.qpid.server.model.Exchange. We can do a look up by ID
                            // because we needed to use ObjectIds that were based on names in order to allow qpid-config
                            // to work, so we may as well make use of this convenience here too.
                            if (alternateExchange != null)
                            {
                                ObjectId objectId =
                                        new ObjectId("", "org.apache.qpid.broker:exchange:" + alternateExchange, 0);

                                // Look up Exchange QmfAgentData by ObjectId from the Agent's internal Object store.
                                QmfAgentData object = agent.getObject(objectId);
                                if (object != null)
                                {
View Full Code Here

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

        {
            MethodCallWorkItem item = (MethodCallWorkItem)wi;
            MethodCallParams methodCallParams = item.getMethodCallParams();

            String methodName = methodCallParams.getName();
            ObjectId objectId = methodCallParams.getObjectId();

            // Look up QmfAgentData by ObjectId from the Agent's internal Object store.
            QmfAgentData object = _agent.getObject(objectId);
            if (object == null)
            {
View Full Code Here

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

        // ObjectId needs to be set here in Queue because the QMF2 version of qpid-config uses a hardcoded
        // _object_name as below in the _object_id that it sets in the getQueue() call and in queueRef.
        // It *shouldn't* do this and should really use the _object_id of the queue object returned by
        // getObjects("queue"), but it does. The following line causes the Agent to use the explicit
        // ObjectId below rather than constructing its own, which fixes the qpid-config issue.
        setObjectId(new ObjectId("", "org.apache.qpid.broker:queue:" + name, 0));
    }
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.