Examples of TabularDataSupport


Examples of javax.management.openmbean.TabularDataSupport

            }

            try {
                rc.put(CompositeDataConstants.STRING_PROPERTIES, createTabularData(m, stringPropertyTabularType, String.class));
            } catch (IOException e) {
                rc.put(CompositeDataConstants.STRING_PROPERTIES, new TabularDataSupport(stringPropertyTabularType));
            }
            try {
                rc.put(CompositeDataConstants.BOOLEAN_PROPERTIES, createTabularData(m, booleanPropertyTabularType, Boolean.class));
            } catch (IOException e) {
                rc.put(CompositeDataConstants.BOOLEAN_PROPERTIES, new TabularDataSupport(booleanPropertyTabularType));
            }
            try {
                rc.put(CompositeDataConstants.BYTE_PROPERTIES, createTabularData(m, bytePropertyTabularType, Byte.class));
            } catch (IOException e) {
                rc.put(CompositeDataConstants.BYTE_PROPERTIES, new TabularDataSupport(bytePropertyTabularType));
            }
            try {
                rc.put(CompositeDataConstants.SHORT_PROPERTIES, createTabularData(m, shortPropertyTabularType, Short.class));
            } catch (IOException e) {
                rc.put(CompositeDataConstants.SHORT_PROPERTIES, new TabularDataSupport(shortPropertyTabularType));
            }
            try {
                rc.put(CompositeDataConstants.INT_PROPERTIES, createTabularData(m, intPropertyTabularType, Integer.class));
            } catch (IOException e) {
                rc.put(CompositeDataConstants.INT_PROPERTIES, new TabularDataSupport(intPropertyTabularType));
            }
            try {
                rc.put(CompositeDataConstants.LONG_PROPERTIES, createTabularData(m, longPropertyTabularType, Long.class));
            } catch (IOException e) {
                rc.put(CompositeDataConstants.LONG_PROPERTIES, new TabularDataSupport(longPropertyTabularType));
            }
            try {
                rc.put(CompositeDataConstants.FLOAT_PROPERTIES, createTabularData(m, floatPropertyTabularType, Float.class));
            } catch (IOException e) {
                rc.put(CompositeDataConstants.FLOAT_PROPERTIES, new TabularDataSupport(floatPropertyTabularType));
            }
            try {
                rc.put(CompositeDataConstants.DOUBLE_PROPERTIES, createTabularData(m, doublePropertyTabularType, Double.class));
            } catch (IOException e) {
                rc.put(CompositeDataConstants.DOUBLE_PROPERTIES, new TabularDataSupport(doublePropertyTabularType));
            }
            return rc;
        }
View Full Code Here

Examples of javax.management.openmbean.TabularDataSupport

            CompositeType rowType = new CompositeType(typeName, typeName, keyValue, keyValue, openTypes);
            return new TabularType(typeName, typeName, rowType, new String[]{"key"});
        }

        protected TabularDataSupport createTabularData(ActiveMQMessage m, TabularType type, Class valueType) throws IOException, OpenDataException {
            TabularDataSupport answer = new TabularDataSupport(type);
            Set<Map.Entry<String,Object>> entries = m.getProperties().entrySet();
            for (Map.Entry<String, Object> entry : entries) {
                Object value = entry.getValue();
                if (valueType.isInstance(value)) {
                    CompositeDataSupport compositeData = createTabularRowValue(type, entry.getKey(), value);
                    answer.put(compositeData);
                }
            }
            return answer;
        }
View Full Code Here

Examples of javax.management.openmbean.TabularDataSupport

    /* (non-Javadoc)
     * @see org.drools.core.management.KnowledgeBaseMBean#getGlobals()
     */
    @SuppressWarnings("unchecked")
    public TabularData getGlobals() throws OpenDataException {
        TabularDataSupport globalsTable = new TabularDataSupport( globalsTableType );
        for ( Map.Entry<String, Class< ? >> global : ((Map<String, Class< ? >>) kbase.getGlobals()).entrySet() ) {
            Object[] itemValues = {global.getKey(), global.getValue().getName()};
            CompositeData result = new CompositeDataSupport( globalsType,
                                                             globalsColNames,
                                                             itemValues );
            globalsTable.put( result );
        }
        return globalsTable;
    }
View Full Code Here

Examples of javax.management.openmbean.TabularDataSupport

        }


        List<QueueEntry> messages = getMessages(startPosition, endPosition);

        TabularDataSupport messageTable = new TabularDataSupport(MSG_LIST_DATA_TYPE);


            // Create the tabular list of message header contents
            long position = startPosition;

            for (QueueEntry queueEntry : messages)
            {
                ServerMessage serverMsg = queueEntry.getMessage();
                AMQMessageHeader header = serverMsg.getMessageHeader();
                String[] headerAttributes =
                    {"reply-to = " + header.getReplyTo(),
                     "propertyFlags = ",
                     "ApplicationID = " + header.getAppId(),
                     "ClusterID = ",
                     "UserId = " + header.getUserId(),
                     "JMSMessageID = " + header.getMessageId(),
                     "JMSCorrelationID = " + header.getCorrelationId(),
                     "JMSDeliveryMode = " + (serverMsg.isPersistent() ? "Persistent" : "Non_Persistent"),
                     "JMSPriority = " + header.getPriority(),
                     "JMSType = " + header.getType(),
                     "JMSExpiration = " + (header.getExpiration() == 0 ? null : FAST_DATE_FORMAT.format(header.getExpiration())),
                     "JMSTimestamp = " + (header.getTimestamp() == 0 ? null : FAST_DATE_FORMAT.format(header.getTimestamp()))
                     };

                Object[] itemValues = new Object[]{ serverMsg.getMessageNumber(),
                                                    headerAttributes,
                                                    serverMsg.getSize(),
                                                    queueEntry.isRedelivered(),
                                                    position,
                                                    queueEntry.getDeliveryCount()};

                position++;

                CompositeData messageData =
                        new CompositeDataSupport(MSG_DATA_TYPE, VIEW_MSGS_COMPOSITE_ITEM_NAMES_DESC_ARRAY, itemValues);
                messageTable.put(messageData);
            }

        return messageTable;

    }
View Full Code Here

Examples of javax.management.openmbean.TabularDataSupport

        }

        try {
            Vector mappedClassNames = getMappedClassNamesUsingFilter(filter);
            String mappedClassName;
            TabularDataSupport rowData = new TabularDataSupport(buildTabularTypeForClassSummaryDetails());
            // Check if there aren't any classes mapped
            if (mappedClassNames.size() == 0) {
                return null;
            }

            // get details for each class, and add the details to the summary
            for (int index = 0; index < mappedClassNames.size(); index++) {
                mappedClassName = (String)mappedClassNames.elementAt(index);
                String[] key = new String[] { mappedClassName };
                rowData.put(key, buildDetailsFor(mappedClassName, rowData.getTabularType().getRowType()));
            }
            return rowData;
        } catch (Exception exception) {
            AbstractSessionLog.getLog().log(SessionLog.SEVERE, "weblogic_mbean_runtime_exception", exception);
        }
View Full Code Here

Examples of javax.management.openmbean.TabularDataSupport

     */
    private TabularData buildClassSummaryDetails() {
        try {
            Vector mappedClassNames = getMappedClassNames();
            String mappedClassName;
            TabularDataSupport rowData = new TabularDataSupport(buildTabularTypeForClassSummaryDetails());
            // Check if there aren't any classes mapped
            if (mappedClassNames.size() == 0) {
                return null;
            }

            // get details for each class, and add the details to the summary
            for (int index = 0; index < mappedClassNames.size(); index++) {
                mappedClassName = (String)mappedClassNames.elementAt(index);
                String[] key = new String[] { mappedClassName };
                rowData.put(key, buildDetailsFor(mappedClassName, rowData.getTabularType().getRowType()));
            }

            return rowData;
        } catch (Exception exception) {
            AbstractSessionLog.getLog().log(SessionLog.SEVERE, "weblogic_mbean_runtime_exception", exception);
View Full Code Here

Examples of javax.management.openmbean.TabularDataSupport

  /**
   * newTabularDataInstance
   */
  public static TabularData newTabularDataInstance() {
    return new TabularDataSupport( TABULAR_TYPE );
  }
View Full Code Here

Examples of javax.management.openmbean.TabularDataSupport

  /**
   * newTabularDataInstance
   */
  public static TabularData newTabularDataInstance() {
    return new TabularDataSupport( TABULAR_TYPE );
  }
View Full Code Here

Examples of javax.management.openmbean.TabularDataSupport

  /**
   * @return tabular data
   */
  public static TabularData newTabularDataInstance() {
    return new TabularDataSupport( TABULAR_TYPE );
  }
View Full Code Here

Examples of javax.management.openmbean.TabularDataSupport

  /**
   * newTabularDataInstance
   */
  public static TabularData newTabularDataInstance() {
    return new TabularDataSupport( TABULAR_TYPE );
  }
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.