Package org.apache.qpid.management.ui

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


        _clearButton.setLayoutData(gridData);
        _clearButton.addSelectionListener(new SelectionAdapter()
        {
            public void widgetSelected(SelectionEvent e)
            { 
                ServerRegistry serverRegistry = ApplicationRegistry.getServerRegistry(MBeanView.getServer());
                IStructuredSelection ss = (IStructuredSelection)_tableViewer.getSelection();
                if(!ss.isEmpty())
                {
                    //clear selected Notifications
                    serverRegistry.clearNotifications(null, ss.toList());
                }
                else if(_notifications != null)
                {
                    //clear all the notifications, if there are any
                   
                    //check the user is certain of this clear-all operation
                    int response = ViewUtility.popupOkCancelConfirmationMessage(
                            "Clear Notifications", "Clear all Notifications for this VirtualHost?");
                    if(response != SWT.OK)
                    {
                        return;
                    }
                   
                    synchronized(this)
                    {
                        serverRegistry.clearNotifications(null, _notifications);
                    }
                }

                refresh();
            }
View Full Code Here


     */
    protected void updateTableViewer()
    {
        String virtualhost = MBeanView.getVirtualHost();
       
        ServerRegistry serverRegistry = ApplicationRegistry.getServerRegistry(MBeanView.getServer());       
        List<NotificationObject> newList = serverRegistry.getNotifications(virtualhost);
       
        synchronized(this)
        {
            _notifications = newList;
            _tableViewer.setInput(_notifications);
View Full Code Here

            {
                showMBean(_mbean);
            }
            else if(NODE_TYPE_SERVER.equals(mbeanType))
            {
                ServerRegistry serverReg = ApplicationRegistry.getServerRegistry(_server);
               
                //check the server is connected
                if(serverReg != null)
                {
                    //post a message if the server supports a newer API version.
                    ApiVersion serverAPI = serverReg.getManagementApiVersion();
                    int supportedMajor = ApplicationRegistry.SUPPORTED_QPID_JMX_API_MAJOR_VERSION;
                    int supportedMinor = ApplicationRegistry.SUPPORTED_QPID_JMX_API_MINOR_VERSION;
                   
                    if(serverAPI.greaterThan(supportedMajor, supportedMinor))
                    {
View Full Code Here

        if(queueName == null)
        {
            return;
        }
       
        ServerRegistry serverRegistry = ApplicationRegistry.getServerRegistry(_mbean);
        ManagedBean selectedMBean = serverRegistry.getQueue(queueName, _mbean.getVirtualHostName());

        if(selectedMBean == null)
        {
            ViewUtility.popupErrorMessage("Error", "Unable to retrieve the selected MBean to open it");
            return;
View Full Code Here

            return;
        }
       
        CompositeData bindingResult = (CompositeData) table.getItem(selectionIndex).getData();
        String queueName = (String) bindingResult.get(HDR_QUEUE_NAME);
        ServerRegistry serverRegistry = ApplicationRegistry.getServerRegistry(_mbean);
        ManagedBean selectedMBean = serverRegistry.getQueue(queueName, _mbean.getVirtualHostName());

        if(selectedMBean == null)
        {
            ViewUtility.popupErrorMessage("Error", "Unable to retrieve the selected MBean to open it");
            return;
View Full Code Here

    }
   
    @Override
    public void refresh(ManagedBean mbean)
    {
        ServerRegistry serverRegistry = ApplicationRegistry.getServerRegistry(MBeanView.getServer());
        _queues = serverRegistry.getQueues(MBeanView.getVirtualHost());
        _exchanges = serverRegistry.getExchanges(MBeanView.getVirtualHost());

        _queueTableViewer.setInput(_queues);
        _exchangeTableViewer.setInput(_exchanges);
       
        layout();
View Full Code Here

        super.dispose();
    }
   
    private void createAttributesTab(TabFolder tabFolder)
    {
        ServerRegistry serverRegistry = ApplicationRegistry.getServerRegistry(_mbean);
        if (serverRegistry.getAttributeModel(_mbean).getCount() == 0)
        {
            return;
        }
       
        TabItem tab = new TabItem(tabFolder, SWT.NONE);
View Full Code Here

        tab.setData(CONTROLLER, controller);
    }
   
    private void createOperationTabs(TabFolder tabFolder)
    {
        ServerRegistry serverRegistry = ApplicationRegistry.getServerRegistry(_mbean);       
        int operationsCount = serverRegistry.getOperationModel(_mbean).getCount();
        if (operationsCount == 0)
        {
            return;
        }
       
        OperationDataModel operationModel = serverRegistry.getOperationModel(_mbean);
        for (OperationData operationData : operationModel.getOperations())
        {
            TabItem operationTab = new TabItem(tabFolder, SWT.NONE);
            operationTab.setText(ViewUtility.getDisplayText(operationData.getName()));
            operationTab.setData(operationData);
View Full Code Here

    {
       if (_mbean == null)
           throw new InfoRequiredException("Please select the managed object and then attribute to be edited");
      
       String name = (_mbean.getName() != null) ? _mbean.getName() : _mbean.getType();
       ServerRegistry serverRegistry = ApplicationRegistry.getServerRegistry(_mbean);
       if (serverRegistry.getAttributeModel(_mbean).getCount() == 0)
       {
           throw new InfoRequiredException("There are no attributes to be edited for " + name);
       }
      
       TabFolder tabFolder = tabFolderMap.get(_mbean.getType());
View Full Code Here

        // map should be cleared before populating it with new values
        getMBeansMap().clear();
        _queueDepthMap.clear();
        _queueConsumerCountMap.clear();
       
        ServerRegistry serverRegistry = ApplicationRegistry.getServerRegistry(MBeanView.getServer());
        String[] items = null;
        java.util.List<ManagedBean> list = null;
       
        // populate the map and list with appropriate mbeans
        list = serverRegistry.getQueues(MBeanView.getVirtualHost());
        items = getQueueItems(list);
        // sort the refreshed list in the selected order
        if (_sortBySizeButton.getSelection())
        {
            sortQueuesByQueueDepth();
View Full Code Here

TOP

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

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.