Package javax.management.openmbean

Examples of javax.management.openmbean.CompositeData


        if (selectionIndex != -1)
        {
            try
            {
                final CompositeData selectedMsg = (CompositeData)_table.getItem(selectionIndex).getData();
                Long msgId = (Long) selectedMsg.get(MSG_AMQ_ID);

                Object result = _qmb.viewMessageContent(msgId);

                populateResults(result);
            }
View Full Code Here


    {
        SortedSet<Long> amqIDs = new TreeSet<Long>();
       
        for(Integer i : _table.getSelectionIndices())
        {
            CompositeData selectedMsg = (CompositeData)_table.getItem(i).getData();
            amqIDs.add((Long)selectedMsg.get(MSG_AMQ_ID));
        }
               
        //initialise the first range
        Long start = amqIDs.first();
        Long end = amqIDs.first();
View Full Code Here

        }

        @Override
        public int compare(Viewer viewer, Object e1, Object e2)
        {
            CompositeData msg1 = (CompositeData) e1;
            CompositeData msg2 = (CompositeData) e2;
           
            int comparison = 0;
            switch(column)
            {
                case 0:
                    comparison = ((Long) msg1.get(MSG_AMQ_ID)).compareTo((Long)msg2.get(MSG_AMQ_ID));
                    break;
                case 1:
                    comparison = ((Long) msg1.get(MSG_SIZE)).compareTo((Long)msg2.get(MSG_SIZE));
                    break;
                case 2:
                    comparison = ((Long) msg1.get(MSG_QUEUE_POS)).compareTo((Long)msg2.get(MSG_QUEUE_POS));
                    break;
                default:
                    comparison = 0;
            }
            // If descending order, flip the direction
View Full Code Here

        if(null == buf)
            return null;

        ByteArrayInputStream inBytes = new ByteArrayInputStream(buf);
        ObjectInputStream inObject;
        CompositeData metadata;
        try {
            inObject = new ObjectInputStream(inBytes);
            metadata = (CompositeData) inObject.readObject();
            inObject.close();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
            return null;
        }

        String typename = metadata.getCompositeType().getTypeName();

        // target first
        if (typename.equals(BlueprintMetadataMBean.BEAN_METADATA))
            return new BPBeanMetadata(metadata);
View Full Code Here

            }
        }
    }

    protected synchronized void onEvent(BlueprintEvent event) {
        CompositeData data = new OSGiBlueprintEvent(event).asCompositeData();
        dataMap.put(event.getBundle().getBundleId(), data);

        if (!event.isReplay()) {
            final Notification notification = new Notification(EVENT_TYPE, OBJECTNAME,
                    notificationSequenceNumber.getAndIncrement());
View Full Code Here

                "spill.size.threshold, spill.gc.activation.size", nfe) ;
        }
    }
   
    public void handleNotification(Notification n, Object o) {
        CompositeData cd = (CompositeData) n.getUserData();
        MemoryNotificationInfo info = MemoryNotificationInfo.from(cd);
        // free the amount exceeded over the threshold and then a further half
        // so if threshold = heapmax/2, we will be trying to free
        // used - heapmax/2 + heapmax/4
        long toFree = 0L;
View Full Code Here

    public String[] getProducerIDs() throws MBeanException  {
  return (ProducerUtil.getProducerIDs());
    }

    public CompositeData[] getProducerInfo() throws MBeanException {
  CompositeData cds[] = null;

  try  {
      cds = ProducerUtil.getProducerInfo();
  } catch(Exception e)  {
      handleOperationException(ProducerOperations.GET_PRODUCER_INFO, e);
View Full Code Here

  return (cds);
    }

    public CompositeData getProducerInfoByID(String producerID) throws MBeanException  {
  CompositeData cd = null;

  try  {
      cd = ProducerUtil.getProducerInfo(producerID);
  } catch(Exception e)  {
      handleOperationException(ProducerOperations.GET_PRODUCER_INFO_BY_ID, e);
View Full Code Here

        return (Boolean.valueOf(Globals.getHAEnabled()));
    }

    public CompositeData getLocalBrokerInfo() throws MBeanException  {
        ClusterManager cm = Globals.getClusterManager();
        CompositeData cd = null;

        if (cm == null)  {
            return (null);
        }
View Full Code Here

      return (null);
    }

  String mbAddr = getMasterBroker();
        ClusterManager cm = Globals.getClusterManager();
        CompositeData cd = null;

        if (cm == null)  {
            return (null);
        }
View Full Code Here

TOP

Related Classes of javax.management.openmbean.CompositeData

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.