Examples of CompositeData


Examples of javax.management.openmbean.CompositeData

        connection.setAttribute(name, new Attribute("complex", createComplexData(connection, complexType, 1, BigDecimal.valueOf(2.0))));


        checkAttributeValues(connection, name, 1, 103, 102, BigInteger.valueOf(104), BigDecimal.valueOf(105), true, new byte[] {106, 107}, 108.0, "109",
                Collections.singletonList(Integer.valueOf(110)), 111, ModelType.STRING, "keyA", 112, "keyB", 113);
        CompositeData compositeData = assertCast(CompositeData.class, connection.getAttribute(name, "complex"));
        Assert.assertEquals(Integer.valueOf(1), compositeData.get("int-value"));
        Assert.assertEquals(BigDecimal.valueOf(2.0), compositeData.get("bigdecimal-value"));
    }
View Full Code Here

Examples of javax.management.openmbean.CompositeData

        Assert.assertEquals("A105", result);
        Assert.assertTrue(IntOperationWithParams.INSTANCE.invoked);

        MBeanInfo info = connection.getMBeanInfo(name);
        CompositeType complexType = assertCast(CompositeType.class, findAttribute(info.getAttributes(), "complex").getOpenType());
        CompositeData complexData = createComplexData(connection, complexType, 5, BigDecimal.valueOf(10));
        Assert.assertEquals(complexData, assertCast(CompositeData.class, connection.invoke(
                name,
                ComplexOperation.OPERATION_NAME,
                new Object[] {complexData},
                new String[] {CompositeData.class.getName()})));
View Full Code Here

Examples of javax.management.openmbean.CompositeData

        ti = ThreadInfo.from(tiCD);
        assertNotNull(ti);
    }

    public CompositeData createGoodCompositeData() {
        CompositeData result = null;
        String[] names = { "threadId", "threadName", "threadState",
                "suspended", "inNative", "blockedCount", "blockedTime",
                "waitedCount", "waitedTime", "lockName", "lockOwnerId",
                "lockOwnerName", "stackTrace" };
        Object[] values = {
View Full Code Here

Examples of javax.management.openmbean.CompositeData

                SimpleType.LONG, SimpleType.STRING, SimpleType.LONG,
                SimpleType.STRING, new ArrayType(1, stackTraceElementType),
                SimpleType.STRING };
        CompositeType compositeType = new CompositeType(ThreadInfo.class
                .getName(), ThreadInfo.class.getName(), names, names, types);
        CompositeData data = new CompositeDataSupport(compositeType, names,
                values);
        ThreadInfo threadInfo = ThreadInfo.from(data);
        assertEquals(values[0], threadInfo.getThreadId());
        assertEquals(values[1], threadInfo.getThreadName());
        assertEquals(GOOD_THREAD_STATE, threadInfo.getThreadState());
View Full Code Here

Examples of javax.management.openmbean.CompositeData

            {
                int selectionIndex = _table.getSelectionIndex();

                if (selectionIndex != -1)
                {
                    final CompositeData selectedLogger = (CompositeData)_table.getItem(
                                                                        selectionIndex).getData();
                    String user = selectedLogger.get(USERNAME).toString();
                    InputDialog id = new InputDialog(setPasswordButton.getShell(),"Set Password",
                                        "Please enter the new password for '" + user + "':",null,null){
                        @Override
                        protected Control createDialogArea(Composite parent)
                        {
View Full Code Here

Examples of javax.management.openmbean.CompositeData

        final ArrayList<String> selectedUsers = new ArrayList<String>();

        for(int index = 0; index < selectedIndices.length ; index++)
        {
            CompositeData selectedUser = (CompositeData)_table.getItem(selectedIndices[index]).getData();
            String user = selectedUser.get(USERNAME).toString();
            selectedUsers.add(user);
        }

        String selectedUsersString = "";
        for(String user : selectedUsers)
View Full Code Here

Examples of javax.management.openmbean.CompositeData

       
        ArrayList<String> selectedUsers = new ArrayList<String>();
       
        for(int index = 0; index < selectedIndices.length ; index++)
        {
            CompositeData selectedUser = (CompositeData)_table.getItem(selectedIndices[index]).getData();
            String user = selectedUser.get(USERNAME).toString();
            selectedUsers.add(user);
        }

        String selectedUsersString = "";
        for(String user : selectedUsers)
View Full Code Here

Examples of javax.management.openmbean.CompositeData

        }

        @Override
        public int compare(Viewer viewer, Object e1, Object e2)
        {
            CompositeData user1 = (CompositeData) e1;
            CompositeData user2 = (CompositeData) e2;
           
            int comparison = 0;
            switch(column)
            {
                case 0: //username column
                    comparison = String.valueOf(user1.get(USERNAME)).compareTo(
                                                String.valueOf(user2.get(USERNAME)));
                    break;
                case 1: // rights column (used for API < 2.3 / 1.12)
                    comparison = classifyUserRights(user1).compareTo(classifyUserRights(user2));
                    break;
                default:
View Full Code Here

Examples of javax.management.openmbean.CompositeData

        TabularDataSupport tabularData = (TabularDataSupport)result;
        Collection<Object> records = tabularData.values();
        List<String> list = new ArrayList<String>();
        for (Object o : records)
        {
            CompositeData data = (CompositeData) o;
            if (data.containsKey(USERNAME))
            {
                list.add(data.get(USERNAME).toString());
            }
        }
       
        return list;
    }
View Full Code Here

Examples of javax.management.openmbean.CompositeData

    {
        int selectionIndex = _keysTable.getSelectionIndex();

        if (selectionIndex != -1)
        {
            final CompositeData selectedMsg = (CompositeData)_keysTable.getItem(selectionIndex).getData();

            String[] queues = (String[]) selectedMsg.get(QUEUE_NAMES);
            _queuesTableViewer.setInput(queues);
        }
        else
        {
            _queuesTableViewer.setInput(new String[]{"Select a binding key to view queues"});
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.