Package org.jboss.on.embedded.bean

Examples of org.jboss.on.embedded.bean.ResourceListItem


    // not all clients need this
    public
    @NotNull
    ResourceListItem getCurrentResourceListItem()
    {
        ResourceListItem resourceListItem;
        Resource resource = getCurrentResource();
        ResourceManager resourceManager = ResourceManagerFactory.resourceManager();
        Availability availability = resourceManager.getAvailability(resource);
        resourceListItem = new ResourceListItem(resource, availability);
        return resourceListItem;
    }
View Full Code Here


    @NotNull
    public void setResourceAndSummaryInfo(Resource selectedResource)
    {
        Availability availability = ResourceManagerFactory.resourceManager().getAvailability(selectedResource);
        resource = new ResourceListItem(selectedResource, availability);
        resourceType = selectedResource.getResourceType();
        summaryMeasurementDisplayList = new ArrayList<MeasurementDisplay>();

        MeasurementUtils measurementUtils = new MeasurementUtils(resource);
        summaryMeasurementDefinitionMap = measurementUtils.getMeasurementDefinitionMap();
View Full Code Here

        Set<Resource> resources = manager.getResources(resourceType, parentResource);
        List<ResourceListItem> items = new ArrayList<ResourceListItem>();
        for (Resource r : resources)
        {
            Availability availability = manager.getAvailability(r);
            ResourceListItem item = new ResourceListItem(r, availability);
            items.add(item);
        }

        return items;
    }
View Full Code Here

    public void testLoadMeasurementDataAll() throws Exception
    {
        final Resource resource = getResourceInstance(ResourceTypes.RESOURCE_TYPE_JMS_TOPIC, "FakeMetricsTopic");
        assert resource != null : "FakeMetricsTopic was not found and it should have been.";

        ResourceListItem resourceListItem = new ResourceListItem(resource, new Availability(resource, new Date(), AvailabilityType.UP));

        MeasurementUtils measurementUtils = new MeasurementUtils(resourceListItem);

        List<MeasurementData> measurementDataList = measurementUtils.loadMeasurementData(null, DataType.MEASUREMENT);
        assert measurementDataList != null : "measurements were null";
View Full Code Here

    public void testLoadMeasurementDataSummary() throws Exception
    {
        final Resource resource = getResourceInstance(ResourceTypes.RESOURCE_TYPE_JMS_TOPIC, "FakeMetricsTopic");
        assert resource != null : "FakeMetricsTopic was not found and it should have been.";

        ResourceListItem resourceListItem = new ResourceListItem(resource, new Availability(resource, new Date(), AvailabilityType.UP));

        MeasurementUtils measurementUtils = new MeasurementUtils(resourceListItem);

        List<MeasurementData> measurementDataList = measurementUtils.loadMeasurementData(DisplayType.SUMMARY, DataType.MEASUREMENT);
        assert measurementDataList != null : "measurements were null";
View Full Code Here

    public void testLoadCategory() throws Exception
    {
        final Resource resource = getResourceInstance(ResourceTypes.RESOURCE_TYPE_JMS_TOPIC, "FakeMetricsTopic");
        assert resource != null : "FakeMetricsTopic was not found and it should have been.";

        ResourceListItem resourceListItem = new ResourceListItem(resource, new Availability(resource, new Date(), AvailabilityType.UP));

        HashMap<String, MeasurementDefinition> measurementDefinitionMap = new HashMap<String, MeasurementDefinition>();
        HashMap<String, List<MeasurementDisplay>> measurementDisplayMap = new HashMap<String, List<MeasurementDisplay>>();

        MeasurementUtils measurementUtils = new MeasurementUtils(resourceListItem);
View Full Code Here

    public void testFormattedMetrics() throws Exception
    {
        final Resource resource = getResourceInstance(ResourceTypes.RESOURCE_TYPE_JMS_TOPIC, "FakeMetricsTopic");
        assert resource != null : "FakeMetricsTopic was not found and it should have been.";

        ResourceListItem resourceListItem = new ResourceListItem(resource, new Availability(resource, new Date(), AvailabilityType.UP));

        List<MeasurementDisplay> measurementDisplayList = new ArrayList<MeasurementDisplay>();

        MeasurementUtils measurementUtils = new MeasurementUtils(resourceListItem);
        Map<String, MeasurementDefinition> measurementDefinitionMap = measurementUtils.getMeasurementDefinitionMap();
View Full Code Here

    public void testMeasurementTraitAll()
    {
        final Resource resource = getResourceInstance(ResourceTypes.RESOURCE_TYPE_JMS_TOPIC, "FakeMetricsTopic");
        assert resource != null : "FakeMetricsTopic was not found and it should have been.";

        ResourceListItem resourceListItem = new ResourceListItem(resource, new Availability(resource, new Date(), AvailabilityType.UP));

        MeasurementUtils measurementUtils = new MeasurementUtils(resourceListItem);

        List<MeasurementData> measurementDataList = measurementUtils.loadMeasurementData(null, DataType.TRAIT);
        assert measurementDataList != null : "measurements were null";
View Full Code Here

    public void testMeasurementTraitSummary()
    {
        final Resource resource = getResourceInstance(ResourceTypes.RESOURCE_TYPE_JMS_TOPIC, "FakeMetricsTopic");
        assert resource != null : "FakeMetricsTopic was not found and it should have been.";

        ResourceListItem resourceListItem = new ResourceListItem(resource, new Availability(resource, new Date(), AvailabilityType.UP));

        MeasurementUtils measurementUtils = new MeasurementUtils(resourceListItem);

        List<MeasurementData> measurementDataList = measurementUtils.loadMeasurementData(DisplayType.SUMMARY, DataType.TRAIT);
        assert measurementDataList != null : "measurements were null";
View Full Code Here

    public void testMeasurementTraitDetail()
    {
        final Resource resource = getResourceInstance(ResourceTypes.RESOURCE_TYPE_JMS_TOPIC, "FakeMetricsTopic");
        assert resource != null : "FakeMetricsTopic was not found and it should have been.";

        ResourceListItem resourceListItem = new ResourceListItem(resource, new Availability(resource, new Date(), AvailabilityType.UP));

        MeasurementUtils measurementUtils = new MeasurementUtils(resourceListItem);

        List<MeasurementData> measurementDataList = measurementUtils.loadMeasurementData(DisplayType.DETAIL, DataType.TRAIT);
        assert measurementDataList != null : "measurements were null";
View Full Code Here

TOP

Related Classes of org.jboss.on.embedded.bean.ResourceListItem

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.