Package org.apache.qpid.management.ui

Examples of org.apache.qpid.management.ui.ManagedBean


        for(int index = 0; index < selectedIndices.length ; index++)
        {
            List<Object> queueEntry = (List<Object>) _table.getItem(selectedIndices[index]).getData();
            String queueName = (String) queueEntry.get(0);
           
            ManagedBean queueMBean = _serverRegistry.getQueue(queueName, _virtualHost);
           
            //check queue had not already been unregistered before trying to add it
            if(queueMBean != null)
            {
                selectedMBeans.add(queueMBean);
            }
            else
            {
                allSucceded = false;
            }
        }

        if(allSucceded)
        {
            //ensure the status bar is cleared of any previous failures added by the below
            ViewUtility.clearStatusBar();
        }
        else
        {
            ViewUtility.operationFailedStatusBarMessage("A selected queue could not be added as it was no longer registered");
            refresh();
        }
       

        IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
        NavigationView view = (NavigationView)window.getActivePage().findView(NavigationView.ID);
       
        ManagedBean bean = null;
        try
        {
            for(ManagedBean mbean: selectedMBeans)
            {
                bean = mbean;
View Full Code Here


        if (selectionIndex == -1)
        {
            return;
        }
       
        ManagedBean selectedMBean;

        //the entries are created from an List<Object> with the attribute values (name first)
        List<Object> queueEntry = (List<Object>) _table.getItem(selectionIndex).getData();
        String queueName = (String) queueEntry.get(0);
        selectedMBean = _serverRegistry.getQueue(queueName, _virtualHost);
View Full Code Here

        Set objectInstances = mbsc.queryMBeans(objName, null);

        for (Iterator itr = objectInstances.iterator(); itr.hasNext();)
        {
            ObjectInstance instance = (ObjectInstance)itr.next();
            ManagedBean obj = new JMXManagedObject(instance.getObjectName());
            mbeans.add(obj);
        }
       
        return mbeans;
    }
View Full Code Here

                String[] selectedItems = _list.getSelection();
                for (int i = 0; i < selectedItems.length; i++)
                {
                    String name = selectedItems[i];
                    // pass the ManagedBean to the navigation view to be added
                    ManagedBean mbean = _objectsMap.get(name);
                    IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
                    NavigationView view = (NavigationView)window.getActivePage().findView(NavigationView.ID);
                    try
                    {
                        view.addManagedBean(mbean);
View Full Code Here

     * @param type - (Queue or Exchange or Connection)
     * @param name - item name
     */
    private void addItemInConfigFile(TreeObject node)
    {
        ManagedBean mbean = (ManagedBean) node.getManagedObject();
        String server = mbean.getServer().getName();
        String virtualhost = mbean.getVirtualHostName();
        String type = node.getParent().getName() + "s";
        String name = node.getName();
        String itemKey = server + "." + virtualhost + "." + type;

        // Check if the item already exists in the config file
View Full Code Here

        }
    }

    private void removeItemFromConfigFile(TreeObject node)
    {
        ManagedBean mbean = (ManagedBean) node.getManagedObject();
        String server = mbean.getServer().getName();
        String vHost = mbean.getVirtualHostName();
        String type = node.getParent().getName() + "s";
        String itemKey = server + "." + vHost + "." + type;

        List<String> list = getConfiguredItemsFromFile(itemKey);
        if (list.contains(node.getName()))
View Full Code Here

     * can invoke this method. It will add the mbean to the list of mbeans to be removed from registry
     * @param objName
     */
    public void unregisterManagedObject(ObjectName objName)
    {
        ManagedBean mbean = _mbeansMap.get(objName.toString());
        removeManagedObject(mbean);
        // Check if mbean was not available in the map. It can happen if mbean unregistration
        // notification is received and the mbean is not added in the map.
        if (mbean != null)
        {
View Full Code Here

       
        String[] items = new String[list.size()];
        int i = 0;
        for (AttributeData data : list)
        {
            ManagedBean mbean = _queueDepthMap.get(data);
            String value = data.getValue().toString();
            items[i++] = mbean.getName() + " (" + value + " KB)";
        }
        getListWidget().setItems(items);
    }
View Full Code Here

       
        String[] items = new String[list.size()];
        int i = 0;
        for (AttributeData data : list)
        {
            ManagedBean mbean = _queueConsumerCountMap.get(data);
            String value = data.getValue().toString();
            items[i++] = mbean.getName() + " (" + value + " )";
        }
        getListWidget().setItems(items);
    }
View Full Code Here

        {
            return results;
        }
        else
        {
            ManagedBean mbean = mbeans.get(0);
            JMXServerRegistry serverRegistry = (JMXServerRegistry)ApplicationRegistry.getServerRegistry(mbean);
            mbsc = serverRegistry.getServerConnection();
        }
       
        if(mbsc == null)
View Full Code Here

TOP

Related Classes of org.apache.qpid.management.ui.ManagedBean

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.