Examples of Agent


Examples of org.apache.qpid.qmf2.console.Agent

            Connection connection = ConnectionHelper.createConnection(url, connectionOptions);       
            _console = new Console();
            _console.addConnection(connection);

            // Find the specified Agent
            Agent agent = _console.findAgent(agentName);
            if (agent == null)
            {
                System.out.println("Agent " + agentName + " not found");
                System.exit(1);
            }
View Full Code Here

Examples of org.apache.qpid.qmf2.console.Agent

        System.out.println("WorkItem type: " + wi.getType());

        if (wi.getType() == AGENT_ADDED)
        {
            AgentAddedWorkItem item = (AgentAddedWorkItem)wi;
            Agent agent = item.getAgent();

            // If this is the gizmo Agent we notify the main thread so processing can continue.
            if (agent.getProduct().equals("gizmo"))
            {
                synchronized(this)
                {
                    _gizmo = agent;
                    notify();
                }
            }
        }

        if (wi.getType() == AGENT_HEARTBEAT)
        {
            AgentHeartbeatWorkItem item = (AgentHeartbeatWorkItem)wi;
            Agent agent = item.getAgent();
            System.out.println(agent.getName());
        }

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

            String className = event.getSchemaClassId().getClassName();
            System.out.println("Event: " + className);
//event.listValues();   
View Full Code Here

Examples of org.apache.qpid.qmf2.console.Agent

    public void onEvent(WorkItem wi)
    {
        if (wi instanceof AgentAddedWorkItem)
        {
            AgentAddedWorkItem item = (AgentAddedWorkItem)wi;
            Agent agent = item.getAgent();
            System.out.println("\nAgent " + agent.getName() + " added ");

            // Retrieve the List of SchemaClassIds from the Agent, these will be used to retrieve the Schema.
            List<SchemaClassId> schemaClassIds = _console.getClasses(agent);

            if (schemaClassIds.size() > 0)
View Full Code Here

Examples of org.apache.qpid.qmf2.console.Agent

        System.out.println("WorkItem type: " + wi.getType());

        if (wi.getType() == AGENT_HEARTBEAT)
        {
            AgentHeartbeatWorkItem item = (AgentHeartbeatWorkItem)wi;
            Agent agent = item.getAgent();
            System.out.println(agent.getName());
        }

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

            String className = event.getSchemaClassId().getClassName();
            System.out.println("Event: " + className);
//event.listValues();   
View Full Code Here

Examples of org.apache.qpid.qmf2.console.Agent

        System.out.println("WorkItem type: " + wi.getType());

        if (wi.getType() == AGENT_HEARTBEAT)
        {
            AgentHeartbeatWorkItem item = (AgentHeartbeatWorkItem)wi;
            Agent agent = item.getAgent();
            System.out.println(agent.getName());
        }

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

            String className = event.getSchemaClassId().getClassName();
            System.out.println("Event: " + className);
//event.listValues();   
View Full Code Here

Examples of org.apache.qpid.qmf2.console.Agent

    public void onEvent(final WorkItem wi)
    {
        if (wi instanceof EventReceivedWorkItem)
        {
            EventReceivedWorkItem item = (EventReceivedWorkItem)wi;
            Agent agent = item.getAgent();
            QmfEvent event = item.getEvent();
            String className = event.getSchemaClassId().getClassName();

            if (className.equals("queueDeclare"))
            {
View Full Code Here

Examples of org.apache.qpid.qmf2.console.Agent

            Connection connection = ConnectionHelper.createConnection(url, connectionOptions);       
            _console = new Console();
            _console.addConnection(connection);

            // Find the specified Agent
            Agent agent = _console.findAgent(agentName);
            if (agent == null)
            {
                System.out.println("Agent " + agentName + " not found");
                System.exit(1);
            }
View Full Code Here

Examples of org.apache.qpid.qmf2.console.Agent

    public void onEvent(final WorkItem wi)
    {
        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;
            }
        }
        else if (wi instanceof AgentRestartedWorkItem)
        {
            _stateChanged = true;
        }
        else if (wi instanceof AgentHeartbeatWorkItem)
        {
            AgentHeartbeatWorkItem item = (AgentHeartbeatWorkItem)wi;
            Agent agent = item.getAgent();

            if (_stateChanged && agent.getName().contains("qpidd"))
            {
                logConnectionInformation();
                _stateChanged = false;
            }
        }
View Full Code Here

Examples of org.apache.qpid.qmf2.console.Agent

                        { // Get information about all available Agents.
                            tx.sendResponse(HTTP_OK, "application/json", JSON.fromObject(console.getAgents()));
                        }
                        else if (path.startsWith("console/agent/"))
                        { // Get information about a specified Agent.
                            Agent agent = console.getAgent(path.substring(14));
                            if (agent == null)
                            {
                                tx.sendResponse(HTTP_NOT_FOUND, "text/plain", "404 Not Found.");
                            }
                            else
View Full Code Here

Examples of org.apache.qpid.qmf2.console.Agent

                        String agentName = oid.getAgentName();

                        // The qpidd ManagementAgent doesn't populate AgentName, if it's empty assume it's the broker.
                        agentName = agentName.equals("") ? "broker" : agentName;

                        Agent agent = console.getAgent(agentName); // Find the Agent we got the QmfData from.
                        if (agent == null)
                        {
                            _log.info("QpidServer.doPost path: {} Agent: {} not found.", tx.getRequestURI(), agentName);
                            tx.sendResponse(HTTP_NOT_FOUND, "text/plain", "404 Not Found.");
                        }
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.