Package org.rhq.core.pluginapi.inventory

Examples of org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails


        Connection connection = null;
        try {
            connection = OracleServerComponent.buildConnection(pluginConfig);
            DatabaseMetaData dbmd = connection.getMetaData();
            String version = dbmd.getDatabaseMajorVersion() + "." + dbmd.getDatabaseMinorVersion();
            DiscoveredResourceDetails details = createResourceDetails(resourceDiscoveryContext, pluginConfig, version,
                null);
            return details;
        } catch (Exception e) {
            LOG.warn("Could not connect to oracle with supplied configuration", e);
            throw new InvalidPluginConfigurationException("Unable to connect to Oracle", e);
View Full Code Here


        Configuration pluginConfig, String version, @Nullable
        ProcessInfo processInfo) {
        String key = pluginConfig.getSimpleValue("sid", "XE");
        String name = key;
        String description = "Oracle " + version + " (" + key + ")";
        return new DiscoveredResourceDetails(discoveryContext.getResourceType(), key, name, version, description,
            pluginConfig, processInfo);
    }
View Full Code Here

        when(hostControllerComponent.isManuallyAddedServer()).thenReturn(Boolean.TRUE);

        Set<DiscoveredResourceDetails> details = discoveryComponent.discoverResources(discoveryContext);
        assertNotNull(details);
        assertEquals(details.size(), 1);
        DiscoveredResourceDetails discoveredResourceDetails = details.iterator().next();
        String rtFilePath = discoveredResourceDetails.getPluginConfiguration().getSimpleValue(
            ResponseTimeConfiguration.RESPONSE_TIME_LOG_FILE_CONFIG_PROP);
        assertNull(rtFilePath);
    }
View Full Code Here

                    }
                    pluginConfig.put(new PropertySimple(HOST_CONFIGURATION_PROPERTY, listenAddress));
                }
            }

            DiscoveredResourceDetails resourceDetails = createResourceDetails(context, pluginConfig, procInfo, false);
            servers.add(resourceDetails);
        }

        return servers;
View Full Code Here

        Connection conn = null;
        try {
            conn = buildConnection(pluginConfiguration, logConnectionFailure);
            String name = getServerResourceName(pluginConfiguration, conn);
            String version = getVersion(processInfo, discoveryContext.getSystemInformation(), conn);
            return new DiscoveredResourceDetails(discoveryContext.getResourceType(), key, name, version,
                DEFAULT_RESOURCE_DESCRIPTION, pluginConfiguration, processInfo);
        } finally {
            DatabasePluginUtil.safeClose(conn);
        }
    }
View Full Code Here

            String version = getVersion(jbossWebDir);
            String description = "JBossAS-Embedded " + serverName + " Web Server (" + jbossWebDir.getName()
                + File.separator + ")";
            Configuration pluginConfig = null;
            ProcessInfo processInfo = null;
            DiscoveredResourceDetails resource = new DiscoveredResourceDetails(context.getResourceType(), key,
                getResourceName(pre42), version, description, pluginConfig, processInfo);
            set.add(resource);
        }

        return set;
View Full Code Here

                        String name = DEFAULT_NAME;
                        String description = DEFAULT_DESCRIPTION;
                        String version = getVersion(address, port, libPath);

                        // add the new details for the new resource in our set to be returned
                        DiscoveredResourceDetails details = new DiscoveredResourceDetails(context.getResourceType(),
                            key, name, version, description, pluginConfig, null);
                        set.add(details);

                        // done, no need to keep looking at the command line args, we found what we need
                        break;
View Full Code Here

        String key = address + ':' + port;
        String name = DEFAULT_NAME;
        String description = DEFAULT_DESCRIPTION;
        String version = getVersion(address, port, clientJar);

        DiscoveredResourceDetails details = new DiscoveredResourceDetails(context.getResourceType(), key, name,
            version, description, pluginConfiguration, null);

        return details;
    }
View Full Code Here

        EmsBean statsBean = context.getParentResourceComponent().getEmsBean();

        String[] entityNames = (String[]) statsBean.getAttribute("EntityNames").refresh();

        for (String entityName : entityNames) {
            DiscoveredResourceDetails detail = new DiscoveredResourceDetails(context.getResourceType(), entityName,
                entityName, null, "Hibernate Entity", null, null);
            entities.add(detail);
        }

        return entities;
View Full Code Here

                    
                      Set<DiscoveredResourceDetails> resources = new HashSet<DiscoveredResourceDetails>();
                
                     for (AugeasNode nd : nodes){
                            String value = nd.getValue();
                            resources.add(new DiscoveredResourceDetails(resourceType,value, value, "", "Chain", null, null));
                  }
             
              return resources;
       }
View Full Code Here

TOP

Related Classes of org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails

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.