Search in sources :

Example 1 with QueryStatDto

use of org.apache.jackrabbit.api.stats.QueryStatDto in project jackrabbit by apache.

the class QueryStatManager method asTabularData.

private TabularData asTabularData(QueryStatDto[] data) {
    TabularDataSupport tds = null;
    try {
        CompositeType ct = QueryStatCompositeTypeFactory.getCompositeType();
        TabularType tt = new TabularType(QueryStatDto.class.getName(), "Query History", ct, QueryStatCompositeTypeFactory.index);
        tds = new TabularDataSupport(tt);
        for (QueryStatDto q : data) {
            tds.put(new CompositeDataSupport(ct, QueryStatCompositeTypeFactory.names, QueryStatCompositeTypeFactory.getValues(q)));
        }
        return tds;
    } catch (Exception e) {
        e.printStackTrace();
        return null;
    }
}
Also used : QueryStatDto(org.apache.jackrabbit.api.stats.QueryStatDto) TabularDataSupport(javax.management.openmbean.TabularDataSupport) TabularType(javax.management.openmbean.TabularType) CompositeDataSupport(javax.management.openmbean.CompositeDataSupport) OpenDataException(javax.management.openmbean.OpenDataException) CompositeType(javax.management.openmbean.CompositeType)

Aggregations

CompositeDataSupport (javax.management.openmbean.CompositeDataSupport)1 CompositeType (javax.management.openmbean.CompositeType)1 OpenDataException (javax.management.openmbean.OpenDataException)1 TabularDataSupport (javax.management.openmbean.TabularDataSupport)1 TabularType (javax.management.openmbean.TabularType)1 QueryStatDto (org.apache.jackrabbit.api.stats.QueryStatDto)1