Package org.cyclopsgroup.jmxterm.io

Examples of org.cyclopsgroup.jmxterm.io.ValueOutputFormat


        else
        {
            result = con.invoke( name, operationName, params, signatures );
        }
        session.output.printMessage( "operation returns: " );
        new ValueOutputFormat( 2, false, showQuotationMarks ).printValue( session.output, result );
        session.output.println( "" );
    }
View Full Code Here


                        break;
                    }
                }
            }
        }
        ValueOutputFormat format = new ValueOutputFormat( 2, showDescription, showQuotationMarks );
        for ( Map.Entry<String, MBeanAttributeInfo> entry : attributeNames.entrySet() )
        {
            String attributeName = entry.getKey();
            MBeanAttributeInfo i = entry.getValue();
            if ( i.isReadable() )
            {
                Object result = con.getAttribute( name, attributeName );
                if ( simpleFormat )
                {
                    format.printValue( session.output, result );
                }
                else
                {
                    format.printExpression( session.output, attributeName, result, i.getDescription() );
                }
                session.output.println( "" );
            }
            else
            {
View Full Code Here

        Session session = getSession();
        // output predefined about properties
        ExtendedProperties props =
            ExtendedPropertiesUtils.loadFromOverlappingResources( "META-INF/cyclopsgroup/jmxterm.properties",
                                                                  getClass().getClassLoader() );
        ValueOutputFormat format = new ValueOutputFormat( 2, showDescription, true );
        for ( Object entryObject : props.subset( "jmxterm.about" ).entrySet() )
        {
            Map.Entry<String, Object> entry = (Map.Entry<String, Object>) entryObject;
            format.printExpression( session.output, entry.getKey(), entry.getValue(), null );
        }

        // output Java runtime properties
        for ( Map.Entry<Object, Object> entry : System.getProperties().entrySet() )
        {
            String keyName = entry.toString();
            if ( keyName.startsWith( "java." ) )
            {
                format.printExpression( session.output, keyName, entry.getValue(), null );
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.cyclopsgroup.jmxterm.io.ValueOutputFormat

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.