Package org.rhq.core.pluginapi.inventory

Examples of org.rhq.core.pluginapi.inventory.ResourceComponent.start()


                container.setResourceComponentState(ResourceComponentState.STOPPED);
                throw new PluginContainerException("Failed getting proxy for resource " + resource + ".", t);
            }

            try {
                component.start(context);
                container.setResourceComponentState(ResourceComponentState.STARTED);
                resource.setConnected(true); // This tells the server-side that the resource has connected successfully.

            } catch (Throwable t) {
                // Don't leave in a STARTING state. Don't actually call component.stop(),
View Full Code Here


        ResourceContext resourceContext = new ResourceContext(resource, null, null, null, null, null, null, null, null,
                null, null, null, null, null, new ComponentInvocationContextImpl());
        resourceContainer.setResourceContext(resourceContext);
        ResourceComponent resourceComponent = new MockResourceComponent(false);
        resourceContainer.setResourceComponent(resourceComponent);
        resourceComponent.start(resourceContext);
        return resourceContainer;
    }

    private class MockResourceComponent implements ResourceComponent, OperationFacet {
        static final String OPERATION_RESULT = "uninterrupted";
View Full Code Here

                c.updateAvailability(null);
                c.setAvailabilitySchedule(null);
                // reset state of res component
                ResourceComponent resourceComponent = c.getResourceComponent();
                resourceComponent.stop();
                resourceComponent.start(c.getResourceContext());
            }
        }

        // this is a hack to get this test to pass. If you run this test class on its own, it passes fine.
        // but if you run it in conjunction with other tests (e.g. mvn -Dtest=AvailTest,DiscoveryCallbackAbortTest)
View Full Code Here

        ResourceContext context = new ResourceContext(cresource, parentComponent,
                null, rdc, systemInfo, temporaryDirectory, dataDirectory,
                pluginContainerName, eventContext, operationContext, contentContext,
                availabilityContext, inventoryContext, pluginContainerDeployment);

        component.start(context);
        components.put(component, cresource);
        resources(type.getChildResourceTypes(), cresource, component, context);
        return component;
    }
View Full Code Here

        ResourceContext context = new ResourceContext(cresource, parentComponent,
                null, rdc, systemInfo, temporaryDirectory, dataDirectory,
                pluginContainerName, eventContext, operationContext, contentContext,
                availContext, inventoryContext,pluginContainerDeployment);

        component.start(context);
        components.put(component, cresource);
        resources(type.getChildResourceTypes(), cresource, component, context);
        return component;
    }
View Full Code Here

        InventoryContext inventoryContext = new InventoryContextImpl(resource, pluginContainer.getInventoryManager());
        ResourceContext context = new ResourceContext(cresource, parentComponent, parentContext,
            resourceDiscoveryComponent, systemInfo, temporaryDirectory, dataDirectory, pluginContainerName,
            eventContext, operationContext, contentContext, availContext, inventoryContext, pluginContainerDeployment);

        component.start(context);
        components.put(component, cresource);
    }

    /**
     * Called before the configuration is processed; override to set specific plugin parameters.
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.